code: def _is_local_fn(fn):
      # Functions or Methods
      if hasattr(fn, "__code__"):
          return fn.__code__.co_flags & inspect.CO_NESTED
      # Callable Objects
      else:
          if hasattr(fn, "__qualname__"):
              return "<locals>" in fn.__qualname__
          fn_type = type(fn)
          if hasattr(fn_type, "__qualname__"):
              return "<locals>" in fn_type.__qualname__
      return False
  
imports: import fnmatch
  import functools
  import inspect
  import os
  import warnings
  from io import IOBase
  from functools import partial
  from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Union
  from torch.utils.data._utils.serialization import DILL_AVAILABLE
label_desc: Use image node_id 2 for calling a global function with example usage: _is_local_fn(fn) and returns: False, unknown, unknown, unknown