code: def projects_from_requirements(requirements):
      
      log = logging.getLogger('ciu')
      valid_reqs = []
      for requirements_path in requirements:
          with io.open(requirements_path) as file:
              requirements_text = file.read()
          # Drop line continuations.
          requirements_text = re.sub(r"\\s*", "", requirements_text)
          # Drop comments.
          requirements_text = re.sub(r"#.*", "", requirements_text)
          reqs = []
          for line in requirements_text.splitlines():
              if not line:
                  continue
              try:
                  reqs.append(packaging.requirements.Requirement(line))
              except packaging.requirements.InvalidRequirement:
                  log.warning('Skipping {0!r}: could not parse requirement'.format(line))
          for req in reqs:
              if not req.name:
                  log.warning('A requirement lacks a name '
                              '(e.g. no `#egg` on a `file:` path)')
              elif req.url:
                  log.warning(
                      'Skipping {0}: URL-specified projects unsupported'.format(req.name))
              else:
                  valid_reqs.append(req.name)
      return frozenset(map(packaging.utils.canonicalize_name, valid_reqs))
docs: Extract the project dependencies from a Requirements specification.