code: def projects_from_metadata(metadata):
      
      projects = []
      for data in metadata:
          meta = distlib.metadata.Metadata(fileobj=io.StringIO(data))
          projects.extend(pypi.just_name(project) for project in meta.run_requires)
      return frozenset(map(packaging.utils.canonicalize_name, projects))
docs: Extract the project dependencies from a metadata spec.