code: def _package_list_from_file(file):
      list_pkgs = []
      with open(file) as fp:
          lines = fp.readlines()
      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.rstrip():
              list_pkgs.append(pkg.rstrip())
      return list_pkgs
  
file_path: pytorch-lightning/docs/source-app/conf.py
imports: import glob
  import inspect
  import os
  import shutil
  import sys
  import lai_sphinx_theme
  from lightning_utilities.docs import fetch_external_assets
  import lightning
label_desc: Use image node_id 2 for calling a global function with example usage: _package_list_from_file(file) and returns: list_pkgs