Art of Electronics 3rd ed. Figure 2.33
A PNP transistor is used to cancel the 0.6V Vbe offset of the NPN transistor which is used as a current sink.
The signal generator gives Vgen=0-10V input for the base of the PNP which gives +0.6V higher to the base of the NPN, which then creates the same Ve voltage on the NPN current sink. The current it sinks is Ic≈Vgen/Re. Re is 1K, so for every volt input, the NPN sinks 1mA of current (programmable current sink).