code: def _named_temporary_file(directory: Optional[str] = None) -> str:
      # `tempfile.NamedTemporaryFile` has issues in Windows
      # https://github.com/deepchem/deepchem/issues/707#issuecomment-556002823
      if directory is None:
          directory = tempfile.gettempdir()
      return os.path.join(directory, os.urandom(24).hex())
  
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 2 for calling a global function with example usage: _named_temporary_file(directory) and returns: os