code: def _to_cpu(X):
      if isinstance(X, numpy.ndarray):
          return X
      elif isinstance(X, tuple):
          return tuple([_to_cpu(x) for x in X])
      elif isinstance(X, list):
          return [_to_cpu(x) for x in X]
      elif hasattr(X, "get"):
          return X.get()
      else:
          return X
  
file_path: thinc/thinc/layers/with_cpu.py
imports: from typing import Any, Callable, Tuple
  import numpy
  from thinc.backends import Ops
  from ..config import registry
  from ..model import Model
label_desc: Use image node_id 4 for calling a global function with example usage: _to_cpu(X) and returns: X, tuple, unknown, X, X