code: def parse_requirements_file(filename: str) -> typing.List:
      """read and parse a Python `requirements.txt` file, returning as a list of str"""
      results: list = []
  
      with pathlib.Path(filename).open() as f:
          for l in f.readlines():
              results.append(l.strip().replace(" ", "").split("#")[0])
  
      return results
  
imports: import importlib.util
  import pathlib
  import setuptools
  import typing
label_desc: Use image node_id 1 for calling a global function with example usage: parse_requirements_file(filename) and returns: results