code: def _package_list_from_file(pfile):
      assert os.path.isfile(pfile)
      with open(pfile) as fp:
          lines = fp.readlines()
      list_pkgs = []
      for ln in lines:
          found = [ln.index(ch) for ch in list(",=<>#@") if ch in ln]
          pkg = ln[: min(found)] if found else ln
          if pkg.strip():
              list_pkgs.append(pkg.strip())
      return list_pkgs
  
file_path: lightning-flash/docs/source/conf.py
imports: import glob
  import os
  import shutil
  import sys
  import warnings
  from importlib.util import module_from_spec, spec_from_file_location
  import pt_lightning_sphinx_theme
label_desc: Use image node_id 4 for calling a global function with example usage: _package_list_from_file(pfile) and returns: list_pkgs