code: def save(fname, data):
      """Saves a list of arrays or a dict of str->array to file.
  
      Parameters
      ----------
      fname : str
          The filename.
      data : NDArray, RowSparseNDArray or CSRNDArray, \
             or list of NDArray, RowSparseNDArray or CSRNDArray, \
             or dict of str to NDArray, RowSparseNDArray or CSRNDArray
          The data to save.
  
      Examples
      --------
      >>> x = mx.nd.zeros((2,3))
      >>> y = mx.nd.ones((1,4))
      >>> mx.nd.save('my_list', [x,y])
      >>> mx.nd.save('my_dict', {'x':x, 'y':y})
      >>> mx.nd.load('my_list')
      [<NDArray 2x3 @cpu(0)>, <NDArray 1x4 @cpu(0)>]
      >>> mx.nd.load('my_dict')
      {'y': <NDArray 1x4 @cpu(0)>, 'x': <NDArray 2x3 @cpu(0)>}
      """
      from ..numpy import ndarray as np_ndarray
  
      if isinstance(data, NDArray):
          data = [data]
          handles = c_array(NDArrayHandle, [])
      if isinstance(data, dict):
          str_keys = data.keys()
          nd_vals = data.values()
          if any(
              not isinstance(k, string_types) for k in str_keys
          ) or any(not isinstance(v, NDArray) for v in nd_vals):
              raise TypeError(
                  "save only accept dict str->NDArray or list of NDArray"
              )
          if any(isinstance(v, np_ndarray) for v in nd_vals):
              raise TypeError(
                  "cannot save mxnet.numpy.ndarray using mxnet.ndarray.save;"
                  " use mxnet.numpy.save instead."
              )
          keys = c_str_array(str_keys)
          handles = c_handle_array(nd_vals)
      elif isinstance(data, list):
          if any(not isinstance(v, NDArray) for v in data):
              raise TypeError(
                  "save only accept dict str->NDArray or list of NDArray"
              )
          if any(isinstance(v, np_ndarray) for v in data):
              raise TypeError(
                  "cannot save mxnet.numpy.ndarray using mxnet.ndarray.save;"
                  " use mxnet.numpy.save instead."
              )
          keys = None
          handles = c_handle_array(data)
      else:
          raise ValueError(
              "data needs to either be a NDArray, dict of str, NDArray pairs "
              "or a list of NDarrays."
          )
      check_call(
          _LIB.MXNDArrayLegacySave(
              c_str(fname), mx_uint(len(handles)), handles, keys
          )
      )
  
file_path: mxnet/python/mxnet/ndarray/utils.py
imports: import ctypes
  from ..base import _LIB, check_call, py_str, c_str, string_types, mx_uint, NDArrayHandle
  from ..base import c_array, c_handle_array, c_str_array
  from .ndarray import NDArray
  from .ndarray import array
  from .ndarray import empty
  from .ndarray import zeros
  from .sparse import zeros
  from .sparse import empty
  from .sparse import array
  from .sparse import _ndarray_cls
label_desc: Use image node_id 6 for calling a global function with example usage: save(fname, data) without return types