code: def save_pickle(network, filepath, python_compatible=False):
      """
      Save layer parameters in pickle file.
  
      Parameters
      ----------
      {save_dict.network}
  
      filepath : str
          Path to the pickle file that stores network parameters.
  
      python_compatible : bool
          If `True` pickled object would be compatible with
          Python 2 and 3 (pickle protocol equal to `2`).
          If `False` then value would be pickled as highest
          protocol (`pickle.HIGHEST_PROTOCOL`).
          Defaults to `False`.
  
      Examples
      --------
      >>> from neupy import layers, storage
      >>>
      >>> network = layers.Input(10) > layers.Softmax(3)
      >>> storage.save_pickle(network, '/path/to/parameters.pickle')
      """
      network = extract_network(network)
      data = save_dict(network)
  
      with open(filepath, "wb+") as f:
          # Protocol 2 is compatible for both python versions
          protocol = (
              pickle.HIGHEST_PROTOCOL if not python_compatible else 2
          )
          pickle.dump(data, f, protocol)
  
imports: import json
  from time import gmtime, strftime
  import six
  import h5py
  import numpy
  import tensorflow
  from six.moves import cPickle
  import neupy
  from neupy.core.docs import shared_docs
  from neupy.layers.graph import LayerGraph
  from neupy.algorithms.base import BaseNetwork
  from neupy.utils import asfloat, tf_utils
label_desc: Use image node_id 8 for calling a global function with example usage: save_pickle(network, filepath, python_compatible) without return types