code: def test_networkpass_on_generate_function(module):
      """This test tests whether equivalency between new or old implementation of nnp_graph"""
      _, inputs = module
      verbose = 1
      callback = nnp_graph.NnpNetworkPass(verbose)
  
      @callback.on_generate_function_by_name("Convolution")
      def change_convolution_param(f):
          print("{}".format(f.proto.convolution_param.pad.dim[:]))
          f.proto.convolution_param.pad.dim[:] = [1, 1]
          return f
  
      @callback.on_function_pass_by_type("Affine")
      def change_affine_param(f, variables, param_scope):
          param_name = f.inputs[1].proto.name
          input_shape = f.inputs[0].proto.shape.dim[:]
          w_shape = f.inputs[1].proto.shape.dim[:]
          rng = np.random.RandomState(388)
          with nn.parameter_scope("", param_scope):
              W = nn.Variable.from_numpy_array(
                  rng.randn(np.prod(input_shape[1:]), w_shape[1])
              )
              nn.parameter.set_parameter(param_name, W)
              W.need_grad = True
  
      with get_saved_test_model(module) as nnp_file:
          ref_nnp = legacy_nnp_graph.NnpLoader(nnp_file)
          nnp = nnp_graph.NnpLoader(nnp_file)
          for ref_v, v in zip(
              nnp_check(ref_nnp, "left", callback),
              nnp_check(nnp, "right", callback),
          ):
              verify_equivalence(ref_v, v)
  
imports: import pytest
  import numpy
  import nnabla
  import nnabla.functions
  import nnabla.parametric_functions
  from nnabla.testing import assert_allclose
  from helper import get_saved_test_model, forward_variable_and_check_equal, forward_variable, assert_topology, dump_network_topology
  import legacy_nnp_graph
  from nnabla.utils import nnp_graph
label_desc: Use image node_id 13 for calling a global function with example usage: test_networkpass_on_generate_function(module) and returns: f