code: def test_graph_unlink_backward(seed):
      rng = np.random.RandomState(seed)
      x0 = nn.Variable([2, 4], need_grad=True)
      x1 = nn.Variable([2, 4], need_grad=True)
      x0.d = rng.randn(*x0.shape)
      x1.d = rng.randn(*x1.shape)
      x0.grad.zero()
      x1.grad.zero()
      with nn.parameter_scope("fc0"):
          h0 = PF.affine(x0, 2)
          h0.need_grad = False
      with nn.parameter_scope("fc1"):
          h1 = PF.affine(x1, 2)
      h = h0 + h1
      with nn.parameter_scope("fc"):
          y1 = PF.affine(h, 1)
          y2 = PF.affine(h, 1)
      nn.forward_all([y1, y2])
  
      y1.backward(clear_buffer=True)
      assert np.all(x0.g == 0)
      assert not np.all(x1.g == 0)
  
      y2.backward(clear_buffer=True)
      assert np.all(x0.g == 0)
      assert not np.all(x1.g == 0)
  
file_path: nnabla/python/test/test_forward_all.py
imports: from six.moves import range
  import pytest
  import numpy
  import nnabla
  import nnabla.functions
  import nnabla.parametric_functions
  from nnabla.testing import assert_allclose
label_desc: Use image node_id 4 for calling a global function with example usage: test_graph_unlink_backward(seed) without return types