code: def _to_device(ops, X):
      if isinstance(X, tuple):
          return tuple([_to_device(ops, x) for x in X])
      elif isinstance(X, list):
          return [_to_device(ops, x) for x in X]
      else:
          return ops.asarray(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 5 for calling a global function with example usage: _to_device(ops, X) and returns: tuple, unknown, ops