code: def is_fx_tracing() -> bool:
      """Returns whether execution is currently in
      Torch FX tracing mode"""
      if torch.jit.is_scripting():
          return False
      if TORCH_VERSION >= (1, 10) and tracing_current_exists:
          return is_fx_tracing_current()
      elif tracing_legacy_exists:
          return is_fx_tracing_legacy()
      else:
          # Can't find either current or legacy tracing indication code.
          # Enabling this assert_fx_safe() call regardless of tracing status.
          return False
  
imports: import inspect
  import torch
  from detectron2.utils.env import TORCH_VERSION
label_desc: Use image node_id 2 for calling a global function with example usage: is_fx_tracing() and returns: False, is_fx_tracing_current, is_fx_tracing_legacy, False