code: def is_out_of_cpu_memory(exception: BaseException) -> bool:
      return (
          isinstance(exception, RuntimeError)
          and len(exception.args) == 1
          and "DefaultCPUAllocator: can't allocate memory"
          in exception.args[0]
      )
  
imports: from typing import Any, Union
  import numpy
  import torch
label_desc: Use image node_id 3 for calling a global function with example usage: is_out_of_cpu_memory(exception) and returns: unknown