code: def default_array(source_array, device=None, dtype=None):
      """Creates an array from any object exposing the default(nd or np) array interface.
  
      Parameters
      ----------
      source_array : array_like
          An object exposing the array interface, an object whose `__array__`
          method returns an array, or any (nested) sequence.
      device : Device, optional
          Device context (default is the current default context).
      dtype : str or numpy.dtype, optional
          The data type of the output array. The default dtype is ``source_array.dtype``
          if `source_array` is an `NDArray`, `float32` otherwise.
  
      Returns
      -------
      NDArray
          An `NDArray`(nd or np) with the same contents as the `source_array`.
      """
      from . import nd as _mx_nd
      from . import np as _mx_np
  
      if is_np_array():
          return _mx_np.array(source_array, device=device, dtype=dtype)
      else:
          return _mx_nd.array(source_array, ctx=device, dtype=dtype)
  
imports: import ctypes
  import functools
  import inspect
  import threading
  import tempfile
  import platform
  from contextlib import contextmanager
  from struct import calcsize
  from .base import _LIB, check_call, c_str, py_str, numeric_types, integer_types, long, _MAX_VALUE_64_BIT_UNSIGNED_, _MAX_VALUE_64_BIT_SIGNED_, _MAX_VALUE_FLOAT32_REPRESENT_
label_desc: Use image node_id 25 for calling a global function with example usage: default_array(source_array, device, dtype) and returns: _mx_np, _mx_nd