parameters: (cls, name)
docstring: Return the Distribution for the given package name.
  
          :param name: The name of the distribution package to search for.
          :return: The Distribution instance (or subclass thereof) for the named
              package, if found.
          :raises PackageNotFoundError: When the named package's distribution
              metadata cannot be found.
docstring_summary: Return the Distribution for the given package name.
docstring_tokens: Return the Distribution for the given package name .
function: def from_name(cls, name):
          """Return the Distribution for the given package name.
  
          :param name: The name of the distribution package to search for.
          :return: The Distribution instance (or subclass thereof) for the named
              package, if found.
          :raises PackageNotFoundError: When the named package's distribution
              metadata cannot be found.
          """
          for resolver in cls._discover_resolvers():
              dists = resolver(DistributionFinder.Context(name=name))
              dist = next(iter(dists), None)
              if dist is not None:
                  return dist
          else:
              raise PackageNotFoundError(name)
function_tokens: def from_name ( cls , name ) : for resolver in cls . _discover_resolvers ( ) : dists = resolver ( DistributionFinder . Context ( name = name ) ) dist = next ( iter ( dists ) , None ) if dist is not None : return dist else : raise PackageNotFoundError ( name )