code: def is_out_of_cuda_memory(exception: BaseException) -> bool:
      """Returns True if the exception is related to CUDA OOM"""
      return (
          isinstance(exception, RuntimeError)
          and len(exception.args) == 1
          and (
              "RuntimeError: cuda runtime error (2) : out of memory"
              in exception.args[0]
              or "CUDA out of memory." in exception.args[0]
          )
      )
  
file_path: tnt/torchtnt/utils/oom.py
imports: import logging
  import os
  import pickle
  from typing import Any, Callable, Dict, Optional, Union
  import torch
  from torchtnt.utils.distributed import get_global_rank
  from torchtnt.utils.fsspec import get_filesystem
  from torchtnt.utils.version import is_torch_version_geq_2_0
label_desc: Use image node_id 2 for calling a global function with example usage: is_out_of_cuda_memory(exception) and returns: unknown