Current mirror and double cascode
The key is to realize that any time you have a controlled current source whose output current value is proportional to the voltage applied across it -- that you can view this element as a resistor. 

I've illustrated this in "Fig. 2". 

Notice that when I apply a voltage "V" across my controlled current source, I get I = gmV.

Notice that when I apply a voltage "V" across a resistor of value (1/gm) I get a current I = V/(1/gm) = gmV. 

Thus they are equivalent.

In Fig. 1 I've drawn the small signal model of the three diode connected devices. Notice that I've included ro. I've drawn the controlling voltage explicitly across each device to make the point that the equivalence of Fig. 2 holds.

Thus you can redraw the circuit as shown in Fig. 3. Usually we just approximate that a 1/gm in parallel to an ro is 1/gm since a small resistor in parallel with a big resistor looks like a small resistor.

I wouldn't normally draw the small-signal model but instead I'd just remember that a diode-connected MOSFET looks like an ro//1/gm.