code: def save(file, arr, allow_pickle=True, fix_imports=True):
      """
      Save an array to a binary file in NumPy ``.npy`` format.
  
      Parameters
      ----------
      file : file, str, or pathlib.Path
          File or filename to which the data is saved.  If file is a file-object,
          then the filename is unchanged.  If file is a string or Path, a ``.npy``
          extension will be appended to the file name if it does not already
          have one.
      arr : array_like
          Array data to be saved.
      allow_pickle : bool, optional
          Allow saving object arrays using Python pickles. Reasons for disallowing
          pickles include security (loading pickled data can execute arbitrary
          code) and portability (pickled objects may not be loadable on different
          Python installations, for example if the stored objects require libraries
          that are not available, and not all pickled data is compatible between
          Python 2 and Python 3).
          Default: True
      fix_imports : bool, optional
          Only useful in forcing objects in object arrays on Python 3 to be
          pickled in a Python 2 compatible way. If `fix_imports` is True, pickle
          will try to map the new Python 3 names to the old module names used in
          Python 2, so that the pickle data stream is readable with Python 2.
  
      See Also
      --------
      savez : Save several arrays into a ``.npz`` archive
      savetxt, load
  
      Notes
      -----
      For a description of the ``.npy`` format, see :py:mod:`numpy.lib.format`.
  
      Examples
      --------
      >>> from tempfile import TemporaryFile
      >>> outfile = TemporaryFile()
  
      >>> x = np.arange(10)
      >>> np.save(outfile, x)
  
      >>> outfile.seek(0) # Only needed here to simulate closing & reopening file
      >>> np.load(outfile)
      array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
  
      """
      own_fid = False
      if hasattr(file, "read"):
          fid = file
      else:
          file = os_fspath(file)
          if not file.endswith(".npy"):
              file = file + ".npy"
          fid = open(file, "wb")
          own_fid = True
  
      if sys.version_info[0] >= 3:
          pickle_kwargs = dict(fix_imports=fix_imports)
      else:
          # Nothing to do on Python 2
          pickle_kwargs = None
  
      try:
          arr = np.asanyarray(arr)
          format.write_array(
              fid,
              arr,
              allow_pickle=allow_pickle,
              pickle_kwargs=pickle_kwargs,
          )
      finally:
          if own_fid:
              fid.close()
  
imports: from __future__ import division, absolute_import, print_function
  import sys
  import os
  import re
  import functools
  import itertools
  import warnings
  import weakref
  from operator import itemgetter, index
  import numpy
  from .None import format
  from ._datasource import DataSource
  from numpy.core import overrides
  from numpy.core.multiarray import packbits, unpackbits
  from numpy.core.overrides import set_module
  from numpy.core._internal import recursive
  from ._iotools import LineSplitter, NameValidator, StringConverter, ConverterError, ConverterLockError, ConversionWarning, _is_string_like, has_nested_fields, flatten_dtype, easy_dtype, _decode_line
  from numpy.compat import asbytes, asstr, asunicode, asbytes_nested, bytes, basestring, unicode, os_fspath, os_PathLike
  from numpy.core.numeric import pickle
label_desc: Use image node_id 5 for calling a global function with example usage: save(file, arr, allow_pickle, fix_imports) without return types