docs: def _read_requirements(filename, extra_packages):
      """Returns a list of package requirements read from the file."""
      requirements_file = open(filename).read()
  
      hard_requirements = []
      for line in requirements_file.splitlines():
          if _is_requirement(line):
              if line.find(';') > -1:
                  dep, condition = tuple(line.split(';'))
                  extra_packages[condition.strip()].append(dep.strip())
              else:
                  hard_requirements.append(line.strip())
      return hard_requirements, extra_packages