Ensure shortened module path points to expected object.
Ensure shortened module path points to expected object.

For example, `matplotlib.pyplot.figure` can be shortened to
`matplotlib.figure`, but the former is a function (that is used a lot)
while the latter is a module (which is generally used much less).

lesteve/sphinx-gallery,sphinx-gallery/sphinx-gallery,Titan-C/sphinx-gallery,sphinx-gallery/sphinx-gallery,lesteve/sphinx-gallery,Titan-C/sphinx-gallery,Eric89GXL/sphinx-gallery,Eric89GXL/sphinx-gallery