code: def is_oom_error(exception: BaseException) -> bool:
      return (
          is_cuda_out_of_memory(exception)
          or is_cudnn_snafu(exception)
          or is_out_of_cpu_memory(exception)
      )
  
file_path: pytorch-lightning/src/lightning/pytorch/utilities/memory.py
imports: import gc
  from typing import Any
  import torch
  from lightning_utilities.core.apply_func import apply_to_collection
  from torch import Tensor
label_desc: Use image node_id 2 for calling a global function with example usage: is_oom_error(exception) and returns: unknown