code: def numpyasarray(np_data):
      """Return a DGLArray representation of a numpy array."""
      data = np_data
      assert data.flags["C_CONTIGUOUS"]
      arr = DGLArray()
      shape = c_array(dgl_shape_index_t, data.shape)
      arr.data = data.ctypes.data_as(ctypes.c_void_p)
      arr.shape = shape
      arr.strides = None
      arr.dtype = DGLDataType(np.dtype(data.dtype).name)
      arr.ndim = data.ndim
      # CPU device
      arr.ctx = context(1, 0)
      return arr, shape
  
imports: from __future__ import absolute_import
  import ctypes
  import sys
  import numpy
  from .base import _FFI_MODE, _LIB, c_array, c_str, check_call, string_types
  from .runtime_ctypes import dgl_shape_index_t, DGLArray, DGLArrayHandle, DGLContext, DGLDataType, TypeCode
label_desc: Use image node_id 2 for calling a global function with example usage: numpyasarray(np_data) and returns: arr,  shape