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)
      )
  
imports: from typing import Any, Union
  import numpy
  import torch
label_desc: Use image node_id 5 for calling a global function with example usage: is_oom_error(exception) and returns: unknown