code: def test_variable_batch_size(
      tmpdir,
      batch_size,
      variable_batch_size,
      model_def,
      input_shape,
      expect_batch_size,
      save_model,
      load_model_and_forward,
  ):
      nn.clear_parameters()
      # step1: Create and save the network model
      tmpdir.ensure(dir=True)
      nnp_file = tmpdir.join("tmp.nnp").strpath
      save_model(nnp_file, model_def, input_shape, variable_batch_size)
      # step2: Load network model and forward.
      out = load_model_and_forward(nnp_file, batch_size)
      # step3: Varify batch_size
      if expect_batch_size != -1:
          batch_size = expect_batch_size
      assert batch_size == out.shape[0]
  
imports: import pytest
  import numpy
  import nnabla
  import nnabla.functions
  import nnabla.parametric_functions
  from nnabla.utils import load
  from nnabla.utils import save
  from nnabla.utils import nnp_graph
  from helper import forward_variable, create_temp_with_dir
label_desc: Use image node_id 15 for calling a global function with example usage: test_variable_batch_size(tmpdir, batch_size, variable_batch_size, model_def, input_shape, expect_batch_size, save_model, load_model_and_forward) without return types