code: def load(file):
      """Load arrays from ``.npy``, ``.npz`` or legacy MXNet file format.
  
      See more details in ``save``.
  
      Parameters
      ----------
      file : str
          The filename.
  
      Returns
      -------
      result : list of ndarrays or dict of str -> ndarray
          Data stored in the file.
  
      Notes
      -----
      This function can only be called within numpy semantics, i.e., `npx.is_np_shape()`
      and `npx.is_np_array()` must both return true.
      """
      if not (is_np_shape() and is_np_array()):
          raise ValueError(
              "Cannot load `mxnet.numpy.ndarray` in legacy mode. Please activate"
              " numpy semantics by calling `npx.set_np()` in the global scope"
              " before calling this function."
          )
      if not isinstance(file, string_types):
          raise TypeError("file required to be a string")
      out_size = mx_uint()
      out_name_size = mx_uint()
      handles = ctypes.POINTER(NDArrayHandle)()
      names = ctypes.POINTER(ctypes.c_char_p)()
      check_call(
          _LIB.MXNDArrayLoad(
              c_str(file),
              ctypes.byref(out_size),
              ctypes.byref(handles),
              ctypes.byref(out_name_size),
              ctypes.byref(names),
          )
      )
      if out_name_size.value == 0:
          if out_size.value != 1:
              return [
                  ndarray(NDArrayHandle(handles[i]))
                  for i in range(out_size.value)
              ]
          return ndarray(NDArrayHandle(handles[0]))
      else:
          assert out_name_size.value == out_size.value
          return dict(
              (py_str(names[i]), ndarray(NDArrayHandle(handles[i])))
              for i in range(out_size.value)
          )
  
file_path: mxnet/python/mxnet/numpy_extension/utils.py
imports: import ctypes
  from ..util import is_np_array, is_np_shape
  from ..base import _LIB, check_call, string_types, c_str_array
  from ..base import c_handle_array, c_str, mx_uint, NDArrayHandle, py_str
  from ..dlpack import ndarray_to_dlpack_for_read, ndarray_to_dlpack_for_write
  from ..dlpack import ndarray_from_dlpack, ndarray_from_numpy
  from ..numpy import ndarray, array
  from ..ndarray import NDArray
label_desc: Use image node_id 3 for calling a global function with example usage: load(file) and returns: ndarray, dict, unknown