code: def test_identity(seed, test, diff_batchsize, graph_ref, graph_act):
      from .graph_converter_test_utils import (
          structure_tester,
          value_tester,
      )
  
      # Random number
      np.random.seed(seed)
      rng = np.random.RandomState(seed)
  
      # Graph
      x_data = rng.randn(batch_size, 3, 32, 32)
      x = nn.Variable.from_numpy_array(x_data)
  
      x1_data = rng.randn(128, 3, 32, 32)
      x1 = nn.Variable.from_numpy_array(x1_data)
  
      # Alter value and copy option
      inp_x = x
      cp_val = True
  
      if diff_batchsize:
          inp_x = x1
          cp_val = False
  
      y_tgt = graph_act(x, test=test)
  
      # FunctionModifier
      modifiers = []
      modifiers.append(
          GC.IdentityModifier({x: inp_x}, copy_value=cp_val)
      )
  
      y_act = GC.GraphConverter(modifiers).convert(y_tgt)
  
      # Ref Graph
      y_ref = graph_ref(inp_x, test=test)
  
      # Test
      structure_tester(y_ref, y_act)
      if diff_batchsize == False:
          value_tester(y_tgt, y_act, rtol=6e-02, atol=5e-02)
  
file_path: nnabla/python/test/utils/test_graph_converters/test_identity.py
imports: from __future__ import absolute_import
  import pytest
  import numpy
  import nnabla
  import nnabla.experimental.graph_converters
  from .ref_graphs.resnets import small_bn_resnet, small_id_resnet
  from .ref_graphs.lenets import lenet, id_lenet
label_desc: Use image node_id 1 for calling a global function with example usage: test_identity(seed, test, diff_batchsize, graph_ref, graph_act) without return types