code: def _load_requirements(
      path_dir: str,
      file_name: str = "base.txt",
      unfreeze: bool = not _FREEZE_REQUIREMENTS,
  ) -> list:
      """Loading requirements from a file.
  
      >>> path_req = os.path.join(_PATH_ROOT, "requirements")
      >>> _load_requirements(path_req, "docs.txt")  # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
      ['sphinx>=4.0', ...]
  
      """
      with open(os.path.join(path_dir, file_name)) as file:
          lines = [ln.strip() for ln in file.readlines()]
      reqs = [
          _augment_requirement(ln, unfreeze=unfreeze) for ln in lines
      ]
      reqs = [
          str(req) for req in reqs if req and not req.startswith("-r")
      ]
      if unfreeze:
          # filter empty lines and containing @ which means redirect to some git/http
          reqs = [
              req
              for req in reqs
              if not any(c in req for c in ["@", "http://", "https://"])
          ]
      return reqs
  
file_path: lightning-flash/setup.py
imports: import glob
  import os
  import re
  from functools import partial
  from importlib.util import module_from_spec, spec_from_file_location
  from itertools import chain
  from setuptools import find_packages, setup
label_desc: Use image node_id 3 for calling a global function with example usage: _load_requirements(path_dir, file_name, unfreeze) and returns: reqs