code: def _prepare_extras() -> Dict[str, Any]:
      assistant = _load_assistant()
      # https://setuptools.readthedocs.io/en/latest/setuptools.html#declaring-extras
      # Define package extras. These are only installed if you specify them.
      # From remote, use like `pip install "pytorch-lightning[dev, docs]"`
      # From local copy of repo, use like `PACKAGE_NAME=pytorch pip install ".[dev, docs]"`
      common_args = {
          "path_dir": _PATH_REQUIREMENTS,
          "unfreeze": "none" if _FREEZE_REQUIREMENTS else "all",
      }
      req_files = [
          Path(p)
          for p in glob.glob(os.path.join(_PATH_REQUIREMENTS, "*.txt"))
      ]
      extras = {
          p.stem: assistant.load_requirements(
              file_name=p.name, **common_args
          )
          for p in req_files
          if p.name not in ("docs.txt", "base.txt")
      }
      for req in parse_requirements(extras["strategies"]):
          extras[req.key] = [str(req)]
      extras["all"] = (
          extras["extra"] + extras["strategies"] + extras["examples"]
      )
      extras["dev"] = extras["all"] + extras["test"]  # + extras['docs']
      return extras
  
file_path: pytorch-lightning/src/pytorch_lightning/__setup__.py
imports: import glob
  import os.path
  from importlib.util import module_from_spec, spec_from_file_location
  from pathlib import Path
  from types import ModuleType
  from typing import Any, Dict
  from pkg_resources import parse_requirements
  from setuptools import find_packages
label_desc: Use image node_id 3 for calling a global function with example usage: _prepare_extras() and returns: extras