code: def get_requirements(requirements_file="requirements.txt"):
      
      with open(requirements_file) as fd:
          lines = fd.readlines()
      dependencies = []
      for line in lines:
          maybe_dep = line.strip()
          if maybe_dep.startswith("#"):
              # Skip pure comment lines
              continue
          if maybe_dep.startswith("git+"):
              # VCS reference for dev purposes, expect a trailing comment
              # with the normal requirement
              __, __, maybe_dep = maybe_dep.rpartition("#")
          else:
              # Ignore any trailing comment
              maybe_dep, __, __ = maybe_dep.partition("#")
          # Remove any whitespace and assume non-empty results are dependencies
          maybe_dep = maybe_dep.strip()
          if maybe_dep:
              dependencies.append(maybe_dep)
      return dependencies
docs: Get the contents of a file listing the requirements.
  
      Args:
          requirements_file (str): The path to the requirements file, relative
                                   to this file.
  
      Returns:
          list: the list of requirements, or an empty list if
                ``requirements_file`` could not be opened or read.