coolant temperature sensor on 2002 Nissan Pathfinder

where is the coolant temperature sensor and how to replace?

Asked by for the 2002 Nissan Pathfinder
There are two temperature switches on is for the operation of the temperature gauge and the other switch tells the fuel injection computer the temperature of the engine coolant.
The Fuel injected related switch is at the back of the engine (passenger side) It has a light green and red wire and a black wire at the switch.
The temperature gauge switch has a single wire on the switch yellow and red wire at the switch.