code: def try_compile_fn(fn, loc):
      if _jit_internal.is_ignored_fn(fn):
          # Don't do anything for @ignore'd functions
          return None
  
      if isinstance(fn, torch.nn.Module):
          # Since modules are callable pybind recognizes them as functions, but
          # don't do anything for them
          return None
  
      if not inspect.isfunction(fn) and not inspect.ismethod(fn):
          raise RuntimeError(
              f"`{fn}` is not a function. Recursive scripting only supports "
              "Python functions or methods currently.\n"
              f"Consider manually annotating `{fn}` with @torch.jit.script."
          )
  
      # We don't have the actual scope where the function was defined, but we can
      # extract the necessary info from the closed over variables on the function
      # object
      rcb = _jit_internal.createResolutionCallbackFromClosure(fn)
      return torch.jit.script(fn, _rcb=rcb)
  
imports: import collections
  import functools
  import inspect
  import sys
  import textwrap
  import types
  import warnings
  from typing import Dict, List, Set, Type
  import torch
  import torch._jit_internal
  from torch._sources import fake_range
  from torch.jit._builtins import _find_builtin
  from torch.jit._check import AttributeTypeIsSupportedChecker
  from torch.jit._state import _add_script_class, _get_script_class, _python_cu
  from torch.jit.frontend import get_class_properties, get_default_args, get_jit_class_def, get_jit_def
  from torch.nn import Module
label_desc: Use image node_id 26 for calling a global function with example usage: try_compile_fn(fn, loc) and returns: torch, None, None