code: def test_nnp_graph_save_type(
      seed, tmpdir, need_file_object, file_type
  ):
      rng = np.random.RandomState(seed)
  
      def unit(i, prefix):
          c1 = PF.convolution(
              i, 4, (3, 3), pad=(1, 1), name=prefix + "-c1"
          )
          c2 = PF.convolution(
              F.relu(c1), 4, (3, 3), pad=(1, 1), name=prefix + "-c2"
          )
          c = F.add2(c2, c1, inplace=True)
          return c
  
      x = nn.Variable([2, 3, 4, 4])
      c1 = unit(x, "c1")
      c2 = unit(x, "c2")
      y = PF.affine(c2, 5, name="fc")
  
      runtime_contents = {
          "networks": [
              {
                  "name": "graph",
                  "batch_size": 2,
                  "outputs": {"y": y},
                  "names": {"x": x},
              }
          ],
      }
      nnp = get_nnp(
          runtime_contents, tmpdir, need_file_object, file_type
      )
  
      graph = nnp.get_network("graph")
      x2 = graph.inputs["x"]
      y2 = graph.outputs["y"]
  
      d = rng.randn(*x.shape).astype(np.float32)
      x.d = d
      x2.d = d
      y.forward(clear_buffer=True)
      y2.forward(clear_buffer=True)
      assert_allclose(y.d, y2.d)
  
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 20 for calling a global function with example usage: test_nnp_graph_save_type(seed, tmpdir, need_file_object, file_type) and returns: c