code: def save_nk_object(obj, filename="file", path="", extension="nk", compress=False, compatibility=-1):
      
      if compress is True:
          with gzip.open(path + filename + "." + extension, 'wb') as name:
              pickle.dump(obj, name, protocol=compatibility)
      else:
          with open(path + filename + "." + extension, 'wb') as name:
              pickle.dump(obj, name, protocol=compatibility)
docs: Save whatever python object to a pickled file.
  
      Parameters
      ----------
      file : object
          Whatever python thing (list, dict, ...).
      filename : str
          File's name.
      path : str
          File's path.
      extension : str
          File's extension. Default "nk" but can be whatever.
      compress: bool
          Enable compression using gzip.
      compatibility : int
          See :func:`pickle.dump`.
  
  
      Example
      ----------
      >>> import neurokit as nk
      >>> obj = [1, 2]
      >>> nk.save_nk_object(obj, filename="myobject")
  
      Notes
      ----------
      *Authors*
  
      - `Dominique Makowski <https://dominiquemakowski.github.io/>`_
  
      *Dependencies*
  
      - pickle
      - gzip