code: def _write_h5(self, filename, nnp):
      import h5py
  
      with h5py.File(filename, "w") as hd:
          for i, param in enumerate(nnp.parameter):
              data = np.reshape(
                  list(param.data), tuple(list(param.shape.dim))
              )
              dset = hd.create_dataset(
                  param.variable_name, dtype="f4", data=data
              )
              dset.attrs["need_grad"] = param.need_grad
              dset.attrs["index"] = i
  
file_path: nnabla/python/src/nnabla/utils/converter/nnabla/exporter.py
imports: import glob
  import os
  import shutil
  import tempfile
  import warnings
  import zipfile
  import google.protobuf.text_format
  import numpy
  from nnabla.utils import nnabla_pb2
  from nnabla.logger import logger
label_desc: Use image node_id 4 for calling the NnpExporter obj's underlying member method code with example usage: obj._write_h5(filename, nnp) without return types