code: def compare_nn_variable_metadata(ref_v, v):
      assert ref_v.d.shape == v.d.shape
      assert ref_v.need_grad == v.need_grad
  
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 6 for calling a global function with example usage: compare_nn_variable_metadata(ref_v, v) without return types