code: def forward_variable_and_check_equal(variable_a, variable_b):
      def forward_output(variable):
          if isinstance(variable, nn.Variable):
              variable.forward()
          else:
              y = F.sink(*variable)
              for v in variable:
                  v.persistent = True
              y.forward()
  
      for v in [variable_a, variable_b]:
          forward_output(v)
      if isinstance(variable_a, nn.Variable):
          assert_allclose(variable_a.d, variable_b.d)
          return
      for a, b in zip(variable_a, variable_b):
          assert_allclose(a.d, b.d, rtol=1e-4, atol=1e-6)
  
imports: import os
  import io
  import pytest
  import numpy
  import nnabla
  import nnabla.functions
  from nnabla.testing import assert_allclose
  from contextlib import contextmanager
  from shutil import rmtree
  import tempfile
  import numpy
  import warnings
  from legacy_expander import NnpExpander
  from nnabla.utils import nnabla_pb2
  from legacy_load import _create_variable
  import google.protobuf.text_format
  from nnabla.utils.image_utils import imsave
  from nnabla.utils.get_file_handle import get_file_handle_save
  from nnabla.utils.nnp_format import nnp_version
label_desc: Use image node_id 1 for calling a global function with example usage: forward_variable_and_check_equal(variable_a, variable_b) without return types