parameters: (path_item, entry, only)
return_statement: return (
          distributions_from_metadata
          if is_meta else
          find_distributions
          if not only and _is_egg_path(entry) else
          resolve_egg_link
          if not only and lower.endswith('.egg-link') else
          NoDists()
      )
docstring: Return a dist_factory for a path_item and entry
docstring_summary: Return a dist_factory for a path_item and entry
docstring_tokens: Return a dist_factory for a path_item and entry
function: def dist_factory(path_item, entry, only):
      """
      Return a dist_factory for a path_item and entry
      """
      lower = entry.lower()
      is_meta = any(map(lower.endswith, ('.egg-info', '.dist-info')))
      return (
          distributions_from_metadata
          if is_meta else
          find_distributions
          if not only and _is_egg_path(entry) else
          resolve_egg_link
          if not only and lower.endswith('.egg-link') else
          NoDists()
      )
function_tokens: def dist_factory ( path_item , entry , only ) : lower = entry . lower ( ) is_meta = any ( map ( lower . endswith , ( '.egg-info' , '.dist-info' ) ) ) return ( distributions_from_metadata if is_meta else find_distributions if not only and _is_egg_path ( entry ) else resolve_egg_link if not only and lower . endswith ( '.egg-link' ) else NoDists ( ) )