code: def get_distribution(dist):
      
      if isinstance(dist, six.string_types):
          dist = Requirement.parse(dist)
      if isinstance(dist, Requirement):
          dist = get_provider(dist)
      if not isinstance(dist, Distribution):
          raise TypeError("Expected string, Requirement, or Distribution", dist)
      return dist
docs: Return a current distribution object for a Requirement or string