code: def array(arr, ctx=cpu(0)):
      """Create an array from source arr.
  
      Parameters
      ----------
      arr : numpy.ndarray
          The array to be copied from
  
      ctx : DGLContext, optional
          The device context to create the array
  
      Returns
      -------
      ret : NDArray
          The created array
      """
      if not isinstance(arr, (_np.ndarray, NDArray)):
          arr = _np.array(arr)
      return empty(arr.shape, arr.dtype, ctx).copyfrom(arr)
  
imports: from __future__ import absolute_import
  import ctypes
  import functools
  import operator
  import numpy
  from .None import backend
  from ._ffi.function import _init_api
  from ._ffi.ndarray import _set_class_ndarray, context, DGLContext, DGLDataType, empty, empty_shared_mem, from_dlpack, NDArrayBase, numpyasarray
  from ._ffi.object import ObjectBase, register_object
label_desc: Use image node_id 3 for calling a global function with example usage: array(arr, ctx) and returns: empty