code: def _set_manifest_path(
      manifest_dir: str,
      aggregate: bool = False,
      mapping: Mapping = _PACKAGE_MAPPING,
  ) -> Generator:
      if aggregate:
          # aggregate all MANIFEST.in contents into a single temporary file
          manifest_path = _named_temporary_file(manifest_dir)
          lines = []
          # load manifest and aggregated all manifests
          for pkg in mapping.values():
              pkg_manifest = os.path.join(_PATH_SRC, pkg, "MANIFEST.in")
              if os.path.isfile(pkg_manifest):
                  with open(pkg_manifest) as fh:
                      lines.extend(fh.readlines())
          # convert lightning_foo to lightning/foo
          for new, old in mapping.items():
              if old == "lightning":
                  continue  # avoid `lightning` -> `lightning/lightning`
              lines = [
                  ln.replace(old, f"lightning/{new}") for ln in lines
              ]
          lines = sorted(
              set(
                  filter(
                      lambda ln: not ln.strip().startswith("#"), lines
                  )
              )
          )
          logging.debug(f"aggregated manifest consists of: {lines}")
          with open(manifest_path, mode="w") as fp:
              fp.writelines(lines)
      else:
          manifest_path = os.path.join(manifest_dir, "MANIFEST.in")
          assert os.path.exists(manifest_path)
      # avoid error: setup script specifies an absolute path
      manifest_path = os.path.relpath(manifest_path, _PATH_ROOT)
      logging.info("Set manifest path to", manifest_path)
      setuptools.command.egg_info.manifest_maker.template = (
          manifest_path
      )
      yield
      # cleanup
      setuptools.command.egg_info.manifest_maker.template = (
          "MANIFEST.in"
      )
      if aggregate:
          os.remove(manifest_path)
  
file_path: pytorch-lightning/setup.py
imports: import contextlib
  import glob
  import logging
  import os
  import tempfile
  from importlib.util import module_from_spec, spec_from_file_location
  from types import ModuleType
  from typing import Generator, Mapping, Optional
  import setuptools
  import setuptools.command.egg_info
label_desc: Use image node_id 3 for calling a global function with example usage: _set_manifest_path(manifest_dir, aggregate, mapping) without return types