code: def test_nnp_optimizer_affine(case_name):
      class Args:
          pass
  
      args = Args()
      nnp_file_name = f"{case_name}.nnp"
      with generate_case_from_nntxt_str(
          cases[case_name], nnp_file_name, ".h5", 32
      ) as nnp_file:
          args.input_file = [nnp_file]
          opt_nnp_file = os.path.join(
              os.path.dirname(nnp_file), f"{case_name}-opt.nnp"
          )
          args.output_file = [opt_nnp_file]
          opt_cli.optimization_command(args)
  
          info_expected = load.load(nnp_file, batch_size=1)
          info_actual = load.load(opt_nnp_file, batch_size=1)
  
          for expected, actual in zip(
              forward(info_expected), forward(info_actual)
          ):
              assert np.allclose(expected, actual)
  
file_path: nnabla/python/test/utils/conversion/test_nnp_optimizer.py
imports: import os
  import pytest
  import numpy
  import nnabla
  import nnabla.utils.cli.optimize_model
  from .nntxt import N0007, N0008
  from .common import generate_case_from_nntxt_str
  from nnabla.utils import load
label_desc: Use image node_id 2 for calling a global function with example usage: test_nnp_optimizer_affine(case_name) without return types