code: def test_function_references():
      import nnabla as nn
      import nnabla.parametric_functions as PF
  
      v = nn.Variable.from_numpy_array(np.random.randn(2, 4))
  
      assert len(v.function_references) == 0
  
      h1 = PF.affine(v, 10, name="affine1")
  
      assert len(v.function_references) == 1
      assert h1.parent in v.function_references
  
      h2 = PF.affine(v, 10, name="affine2")
  
      assert len(v.function_references) == 2
      assert h1.parent in v.function_references
      assert h2.parent in v.function_references
  
      del h1
  
      assert len(v.function_references) == 1
      assert h2.parent in v.function_references
  
      del h2
  
      assert len(v.function_references) == 0
  
imports: import pytest
  import numpy
  import nnabla
  from nnabla.testing import assert_allclose
label_desc: Use image node_id 12 for calling a global function with example usage: test_function_references() without return types