code: def check_nnp_graph_save_load(
      tmpdir, x, y, batch_size, variable_batch_size
  ):
      # Save
      contents = {
          "networks": [
              {
                  "name": "graph",
                  "batch_size": 1,
                  "outputs": {"y": y},
                  "names": {"x": x},
              }
          ]
      }
      from nnabla.utils.save import save
  
      tmpdir.ensure(dir=True)
      tmppath = tmpdir.join("tmp.nnp")
      nnp_file = tmppath.strpath
      save(nnp_file, contents, variable_batch_size=variable_batch_size)
  
      # Load
      from nnabla.utils import nnp_graph
  
      nnp = nnp_graph.NnpLoader(nnp_file)
      graph = nnp.get_network("graph", batch_size=batch_size)
      x2 = graph.inputs["x"]
      y2 = graph.outputs["y"]
      if not variable_batch_size:
          assert x2.shape == x.shape
          assert y2.shape == y.shape
          return x2, y2
  
      assert x2.shape[0] == batch_size
      assert y2.shape[0] == batch_size
      return x2, y2
  
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 21 for calling a global function with example usage: check_nnp_graph_save_load(tmpdir, x, y, batch_size, variable_batch_size) and returns: x2,  y2, x2,  y2