def get_distribution(dist):
if isinstance(dist, six.string_types):<EOL><INDENT>dist = Requirement.parse(dist)<EOL><DEDENT>if isinstance(dist, Requirement):<EOL><INDENT>dist = get_provider(dist)<EOL><DEDENT>if not isinstance(dist, Distribution):<EOL><INDENT>raise TypeError("<STR_LIT>", dist)<EOL><DEDENT>return dist<EOL>
Return a current distribution object for a Requirement or string