code: def test_batch_normalization_folding(
      ctx,
      func_name,
      seed,
      test,
      w_bias,
      channel_last,
      graph_ref,
      graph_act,
      opposite,
      dims,
  ):
      from .graph_converter_test_utils import (
          structure_tester,
          value_tester,
      )
  
      if (channel_last == True or dims != 2) and not func_name.endswith(
          "Cudnn"
      ):
          pytest.skip(
              "ChannelLast conversion and 1D,3D Conv/Deconv conversion are only supported in cuDNN context."
          )
  
      with nn.context_scope(ctx):
          # Random number
          np.random.seed(seed)
          rng = np.random.RandomState(seed)
  
          input_shape = (
              (batch_size,) + (32,) * dims + (3,)
              if channel_last
              else (batch_size,) + (3,) + (32,) * dims
          )
          # Graph
          x_data = rng.randn(*input_shape)
          x = nn.Variable.from_numpy_array(x_data)
  
          y_tgt = graph_act(
              x,
              test=test,
              w_bias=w_bias,
              channel_last=channel_last,
              dims=dims,
          )
  
          # FunctionModifier
          modifiers = []
          modifiers.append(
              GC.BatchNormalizationFoldingModifier(
                  opposite, channel_last
              )
          )
  
          y_act = GC.GraphConverter(modifiers).convert(y_tgt)
  
          # Ref Graph
          y_ref = graph_ref(x, channel_last=channel_last, dims=dims)
  
          # Test
          structure_tester(y_ref, y_act)
          value_tester(y_tgt, y_act, rtol=6e-04, atol=5e-04)
  
file_path: nnabla/python/test/utils/test_graph_converters/test_batch_normalization_folding.py
imports: from __future__ import absolute_import
  import pytest
  import numpy
  import nnabla
  import nnabla.experimental.graph_converters
  from nnabla.ext_utils import get_extension_context
  from nbla_test_utils import list_context
  from .ref_graphs.lenets import bn_lenet, bn_folding_lenet, bn_opp_lenet
  from .ref_graphs.resnets import small_bn_resnet, small_bn_folding_resnet, small_bn_opp_resnet, small_bn_dcn, small_dcn, small_opp_dcn, small_bn_opp_dcn
label_desc: Use image node_id 1 for calling a global function with example usage: test_batch_normalization_folding(ctx, func_name, seed, test, w_bias, channel_last, graph_ref, graph_act, opposite, dims) without return types