code: def compare_nn_variable_with_name(ref_v, v):
      ref_v_name, ref_var, ref_v_dot_name = ref_v
      v_name, var, v_dot_name = v
      assert ref_v_name == v_name
      assert v_dot_name == ref_v_dot_name
      assert ref_var.d.shape == var.d.shape
      assert ref_var.need_grad == var.need_grad
      if ref_v_name[-2:] in ["/b", "/W"]:
          # print("compare {} <--> {}".format(ref_var.d.shape, var.d.shape))
          assert np.allclose(ref_var.d, var.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 7 for calling a global function with example usage: compare_nn_variable_with_name(ref_v, v) without return types