code: def save_dict(network):
      """
      Save network into the dictionary.
  
      Parameters
      ----------
      network : network, list of layer or network
  
      Returns
      -------
      dict
          Saved parameters and information about network in dictionary
          using specific format. Learn more about the NeuPy's storage
          format in the official documentation.
  
      Examples
      --------
      >>> from neupy import layers, storage
      >>>
      >>> network = layers.Input(10) >> layers.Softmax(3)
      >>> layers_data = storage.save_dict(network)
      >>>
      >>> layers_data.keys()
      ['layers', 'graph', 'metadata']
      """
      network = extract_network(network)
      network.create_variables()
  
      session = tf_utils.tensorflow_session()
      tf_utils.initialize_uninitialized_variables()
  
      data = {
          "metadata": {
              "language": "python",
              "library": "neupy",
              "version": neupy.__version__,
              "created": strftime("%a, %d %b %Y %H:%M:%S %Z", gmtime()),
          },
          # Make it as a list in order to save the right order
          # of paramters, otherwise it can be convert to the dictionary.
          "graph": network.layer_names_only(),
          "layers": [],
      }
  
      for layer in network:
          parameters = {}
          configs = {}
  
          for attrname, parameter in layer.variables.items():
              parameters[attrname] = {
                  "value": asfloat(session.run(parameter)),
                  "trainable": parameter.trainable,
              }
  
          for option_name in layer.options:
              if option_name not in parameters:
                  configs[option_name] = getattr(layer, option_name)
  
          data["layers"].append(
              {
                  "class_name": layer.__class__.__name__,
                  "name": layer.name,
                  "parameters": parameters,
                  "configs": configs,
              }
          )
  
      return data
  
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 7 for calling a global function with example usage: save_dict(network) and returns: data