code: def _ignore_torch_cuda_oom():
      """A context which ignores CUDA OOM exception from pytorch.
  
      Code is modified from
      <https://github.com/facebookresearch/detectron2/blob/main/detectron2/utils/memory.py>  # noqa: E501
      """
      try:
          yield
      except RuntimeError as e:
          # NOTE: the string may change?
          if "CUDA out of memory. " in str(e):
              pass
          else:
              raise
  
file_path: mmdetection/mmdet/utils/memory.py
imports: import warnings
  from collections import abc
  from contextlib import contextmanager
  from functools import wraps
  import torch
  from mmengine.logging import MMLogger
label_desc: Use image node_id 2 for calling a global function with example usage: _ignore_torch_cuda_oom() without return types