code: def save_hdf5(network, filepath):
      """
      Save network parameters in HDF5 format.
  
      Parameters
      ----------
      {save_dict.network}
  
      filepath : str
          Path to the HDF5 file that stores network parameters.
  
      Examples
      --------
      >>> from neupy import layers, storage
      >>>
      >>> network = layers.Input(10) > layers.Softmax(3)
      >>> storage.save_hdf5(network, '/path/to/parameters.hdf5')
      """
      network = extract_network(network)
      data = save_dict(network)
  
      with h5py.File(filepath, mode="w") as f:
          layer_names = []
  
          for layer in data["layers"]:
              layer_name = layer["name"]
              layer_group = f.create_group(layer_name)
  
              for attrname, attrvalue in layer.items():
                  if attrname != "parameters":
                      layer_group.attrs[attrname] = json.dumps(
                          attrvalue, default=repr
                      )
  
              for param_name, param in layer["parameters"].items():
                  dataset = layer_group.create_dataset(
                      param_name, data=param["value"]
                  )
  
                  dataset.attrs["trainable"] = param["trainable"]
  
              layer_names.append(layer_name)
  
          f.attrs["metadata"] = json.dumps(data["metadata"])
          f.attrs["graph"] = json.dumps(data["graph"])
          f.attrs["layer_names"] = json.dumps(layer_names)
  
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 10 for calling a global function with example usage: save_hdf5(network, filepath) without return types