code: def _to_chx(array):
      # Converts numpy/cupy.ndarray to chainerx.ndarray.
      # Objects with other types are kept intact.
      if isinstance(array, numpy.ndarray):
          return _from_numpy(array)
      elif cupy is not None and isinstance(array, cupy.ndarray):
          return _from_cupy(array)
      return array
  
file_path: chainer/chainerx/_fallback_workarounds.py
imports: import numpy
  import chainerx
label_desc: Use image node_id 6 for calling a global function with example usage: _to_chx(array) and returns: array, _from_numpy, _from_cupy