code: def is_out_of_cpu_memory(exception: BaseException) -> bool:
      """Returns True if the exception is related to CPU OOM"""
      return (
          isinstance(exception, RuntimeError)
          and len(exception.args) == 1
          and "DefaultCPUAllocator: can't allocate 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 1 for calling a global function with example usage: is_out_of_cpu_memory(exception) and returns: unknown