code: def _as_numpy(x):
      if isinstance(x, chainerx.ndarray):
          return chainerx.to_numpy(x)
      assert isinstance(x, numpy.ndarray) or numpy.isscalar(x)
      return x
  
file_path: chainer/chainerx/testing/array.py
imports: import numpy.testing
  import chainerx
label_desc: Use image node_id 1 for calling a global function with example usage: _as_numpy(x) and returns: x, chainerx