code: def test_persistent():
      x = nn.Variable([2, 3, 4], need_grad=True)
      x1 = x + 1
      x2 = x1 + 1
      x3 = x2 + 1
      y = x3 + 1
      x3.persistent = True
      x.data.zero()
      y.forward(clear_buffer=True)
      assert_allclose(x3.d, 3)
      y.forward(clear_no_need_grad=True)
      y.backward(clear_buffer=True)
      assert_allclose(x3.d, 3)
      assert_allclose(x3.g, 1)
  
imports: import pytest
  import numpy
  import nnabla
  from nnabla.testing import assert_allclose
label_desc: Use image node_id 8 for calling a global function with example usage: test_persistent() without return types