code: def save_obj(obj, save_path):
      """
      Dumps a python data structure to a saved on-disk representation.  We
      currently support writing to the following file formats (expected filename
      extension in brackets):
  
          * python pickle (.pkl)
  
      Arguments:
          obj (object): the python object to be saved.
          save_path (str): Where to write the serialized object (full path and
                           file name)
  
      See Also:
          :py:func:`~neon.models.model.Model.serialize`
      """
      if save_path is None or len(save_path) == 0:
          return
      save_path = os.path.expandvars(os.path.expanduser(save_path))
      logger.debug("serializing object to: %s", save_path)
      ensure_dirs_exist(save_path)
  
      pickle.dump(obj, open(save_path, "wb"), 2)
  
file_path: neon/neon/util/persist.py
imports: import importlib
  import logging
  import os
  import pkgutil
  import sys
  import appdirs
  from neon.util.compat import pickle, pickle_load
label_desc: Use image node_id 5 for calling a global function with example usage: save_obj(obj, save_path) without return types