code: def _protobuf_parameter_file_saver(ctx, filename, ext):
      proto = nnabla_pb2.NNablaProtoBuf()
      for variable_name, variable in ctx.parameters.items():
          parameter = proto.parameter.add()
          parameter.variable_name = variable_name
          parameter.shape.dim.extend(variable.shape)
          parameter.data.extend(
              numpy.array(variable.data.get_data("r"))
              .flatten()
              .tolist()
          )
          parameter.need_grad = variable.need_grad
      with get_file_handle_save(filename, ext) as f:
          f.write(proto.SerializeToString())
  
imports: import contextlib
  import io
  import os
  import re
  import zipfile
  from collections import OrderedDict
  from functools import partial
  import google.protobuf.text_format
  import h5py
  import nnabla
  import numpy
  from nnabla.logger import logger
  from nnabla.utils import nnabla_pb2
  from nnabla.utils.nnp_format import nnp_version
label_desc: Use image node_id 22 for calling a global function with example usage: _protobuf_parameter_file_saver(ctx, filename, ext) without return types