code: def func_set_nnabla_version_decorate(nnp, nnp_version):
      import re
  
      pattern = re.compile(r"(?<!^)(?=[A-Z])")
  
      def convert_from_camel_to_snake(name):
          """Get function name from camel to snake"""
          name = pattern.sub("_", name).lower()
          return name
  
      if nnp_version is None:
          return nnp
  
      network_name = nnp.protobuf.executor[0].network_name
      exec_network = None
      for n in nnp.protobuf.network:
          if n.name == network_name:
              exec_network = n
              for f in n.function:
                  no_param = False
                  try:
                      # Some snake name of function type does not follow the conversion rule
                      # between camel and snake.
                      eval(
                          f"f.{convert_from_camel_to_snake(f.type) +'_param'}"
                      )
                      f_param_name = f"f.{convert_from_camel_to_snake(f.type) +'_param'}"
                      param_name = f"{convert_from_camel_to_snake(f.type) +'_param'}"
                  except AttributeError:
                      try:
                          eval(f"f.{f.type.lower() + '_param'}")
                          f_param_name = (
                              f"f.{f.type.lower() + '_param'}"
                          )
                          param_name = f"{f.type.lower() + '_param'}"
                      except AttributeError:
                          no_param = True
  
                  old_info = _nnabla_func_info_old[f.type]
                  cur_info = _nnabla_func_info_cur[f.type]
  
                  if no_param:
                      if "arguments" in old_info:
                          raise ValueError(
                              f"{f} is not supported for arguments imcompatible change."
                          )
                      else:
                          continue
  
                  for arg_name, arg in cur_info["arguments"].items():
                      if "arguments" not in old_info:
                          def_arg = cur_info["arguments"][arg_name][
                              "default"
                          ]
                          arg = str(eval(f"{f_param_name}.{arg_name}"))
                          if def_arg != arg:
                              raise ValueError(
                                  f"{f} only support default argument: {arg_name}={def_arg}, but actual {arg_name}={arg}!"
                              )
                          exec(f"f.ClearField('{param_name}')")
                      elif arg_name not in old_info["arguments"]:
                          exec(
                              f"{f_param_name}.ClearField('{arg_name}')"
                          )
  
                  if "arguments" in old_info:
                      for arg_name, arg in old_info[
                          "arguments"
                      ].items():
                          if "arguments" not in cur_info:
                              raise ValueError(
                                  f"{f} is not supported for arguments imcompatible change."
                              )
                          if arg_name not in cur_info["arguments"]:
                              # default MUST exist
                              if isinstance(arg, dict):
                                  assert (
                                      "default" in arg
                                  ), "We assume 'default' value is set for this argument."
                                  exec(
                                      f"{f_param_name} + '.' + {arg_name} = {arg['default']}"
                                  )
  
      if exec_network is not None:
          proto = nnabla_pb2.NNablaProtoBuf()
          network = proto.network.add()
          network.CopyFrom(exec_network)
          executor = proto.executor.add()
          executor.CopyFrom(nnp.protobuf.executor[0])
          for p in nnp.protobuf.parameter:
              param = proto.parameter.add()
              param.CopyFrom(p)
          nnp.protobuf = proto
  
      return nnp
  
imports: import pickle
  import zlib
  from collections import OrderedDict
  from os.path import abspath, join, dirname, expanduser
  import glob
  import os
  import yaml
  import certifi
  import ssl
  from nnabla.utils import nnabla_pb2
  from nnabla.logger import logger
label_desc: Use image node_id 5 for calling a global function with example usage: func_set_nnabla_version_decorate(nnp, nnp_version) and returns: nnp, name, nnp