code: def test_link_grad(self):
      class Model(chainer.link.Chain):
          def __init__(self):
              super(Model, self).__init__()
              with self.init_scope():
                  self.link = links.Linear(None, 10)
  
          def forward(self, x):
              return functions.forget(self.link, x)
  
      model = Model()
      model.cleargrads()
      x = numpy.random.uniform(-1, 1, (64, 768)).astype(numpy.float32)
      x = variable.Variable(x, requires_grad=True)
  
      y = functions.sum(model(x))
      y.backward()
      assert isinstance(model.link.W.grad_var, variable.Variable)
      assert isinstance(model.link.b.grad_var, variable.Variable)
  
imports: import functools
  import unittest
  import numpy
  import six
  import chainer
  from chainer import cuda
  from chainer import functions
  from chainer import gradient_check
  from chainer import links
  from chainer import testing
  from chainer.testing import attr
  from chainer import variable
label_desc: Use image node_id 2 for calling the TestForgetGrad obj's underlying member method code with example usage: obj.test_link_grad() and returns: functions