def get_distribution(self, name):
result = None<EOL>name = name.lower()<EOL>if not self._cache_enabled:<EOL><INDENT>for dist in self._yield_distributions():<EOL><INDENT>if dist.key == name:<EOL><INDENT>result = dist<EOL>break<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>self._generate_cache()<EOL>if name in self._cache.name:<EOL><INDENT>result = self._cache.name[name][<NUM_LIT:0>]<EOL><DEDENT>elif self._include_egg and name in self._cache_egg.name:<EOL><INDENT>result = self._cache_egg.name[name][<NUM_LIT:0>]<EOL><DEDENT><DEDENT>return result<EOL>
Looks for a named distribution on the path.

This function only returns the first result found, as no more than one
value is expected. If nothing is found, ``None`` is returned.

:rtype: :class:`InstalledDistribution`, :class:`EggInfoDistribution`
        or ``None``