code: def is_pytorch_profiler_available() -> bool:
      """
      Indicates whether the new pytorch profiler is available
      (available starting from pytorch version 1.8.1)
      """
      try:
          import torch.profiler  # NOQA
  
          return True
      except ImportError:
          return False
  
imports: import functools
  import logging
  import os
  from contextlib import contextmanager
  from vissl.utils.layer_memory_tracking import null_context
label_desc: Use image node_id 2 for calling a global function with example usage: is_pytorch_profiler_available() and returns: True, False