code: def load(file, mmap_mode=None, allow_pickle=None):
      """Loads arrays or pickled objects from ``.npy``, ``.npz`` or pickled file.
  
      This function just calls ``numpy.load`` and then sends the arrays to the
      current device. NPZ file is converted to NpzFile object, which defers the
      transfer to the time of accessing the items.
  
      Args:
          file (file-like object or string): The file to read.
          mmap_mode (None, 'r+', 'r', 'w+', 'c'): If not ``None``, memory-map the
              file to construct an intermediate :class:`numpy.ndarray` object and
              transfer it to the current device.
          allow_pickle (bool): Allow loading pickled object arrays stored in npy
              files. Reasons for disallowing pickles include security, as
              loading pickled data can execute arbitrary code. If pickles are
              disallowed, loading object arrays will fail.
              Please be aware that CuPy does not support arrays with dtype of
              `object`.
              The default is False.
              This option is available only for NumPy 1.10 or later.
              In NumPy 1.9, this option cannot be specified (loading pickled
              objects is always allowed).
  
      Returns:
          CuPy array or NpzFile object depending on the type of the file. NpzFile
          object is a dictionary-like object with the context manager protocol
          (which enables us to use *with* statement on it).
  
      .. seealso:: :func:`numpy.load`
  
      """
      if _support_allow_pickle:
          allow_pickle = False if allow_pickle is None else allow_pickle
          obj = numpy.load(file, mmap_mode, allow_pickle)
      else:
          if allow_pickle is not None:
              warnings.warn(
                  "allow_pickle option is not supported in NumPy 1.9"
              )
          obj = numpy.load(file, mmap_mode)
  
      if isinstance(obj, numpy.ndarray):
          return cupy.array(obj)
      elif isinstance(obj, numpy.lib.npyio.NpzFile):
          return NpzFile(obj)
      else:
          return obj
  
file_path: cupy/cupy/_io/npz.py
imports: import warnings
  import numpy
  import cupy
label_desc: Use image node_id 1 for calling a global function with example usage: load(file, mmap_mode, allow_pickle) and returns: cupy, NpzFile, obj