code: def nnp_check(nnp, side, callback=None):
      yield len(nnp.get_network_names())
      for network_name in sorted(nnp.get_network_names()):
          yield network_name
          network = nnp.get_network(
              network_name, batch_size=4, callback=callback
          )
          # if isinstance(nnp, nnp_graph.NnpLoader):
          #     print("-" * 50)
          #     dump_network_topology(nnp.g.default_graph())
          #     print("-" * 50)
          #     dump_network_topology(network.proto_network)
          #     print("-" * 50)
          for k in sorted(network.variables.keys()):
              print(
                  "variables",
                  side,
                  k,
                  "{}, {}".format(
                      network.variables[k].shape,
                      network.variables[k].d.shape,
                  ),
              )
              yield k, network.variables[k], network.variables[k].name
  
          for k in sorted(network.inputs.keys()):
              print(
                  "inputs",
                  side,
                  k,
                  "{}, {}".format(
                      network.inputs[k].shape, network.inputs[k].d.shape
                  ),
              )
              yield network.inputs[k]
  
          for k in sorted(network.outputs.keys()):
              print(
                  "outputs",
                  side,
                  k,
                  "{}, {}".format(
                      network.outputs[k].shape,
                      network.outputs[k].d.shape,
                  ),
              )
              yield network.outputs[k]
          yield network
  
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 5 for calling a global function with example usage: nnp_check(nnp, side, callback) without return types