code: def check_hardclipping(self, backend_configs):
      target = self.target
      assert len(backend_configs) == len(list(target.params()))
      devices = [bc.device for bc in backend_configs]
  
      lower_bound = -0.9
      upper_bound = 1.1
      expects = []
      # Compute expected
      for param, device in zip(target.params(), devices):
          expects.append(
              param.array
              - np.clip(param.grad, lower_bound, upper_bound)
          )
          param.to_device(device)
  
      # Apply optimizer_hook
      opt = optimizers.SGD(lr=1)
      opt.setup(self.target)
      opt.add_hook(
          optimizer_hooks.GradientHardClipping(lower_bound, upper_bound)
      )
      opt.update()
  
      # Validate
      for expect, param in zip(expects, target.params()):
          testing.assert_allclose(expect, param.array)
  
file_path: chainer/tests/chainer_tests/optimizer_hooks_tests/test_gradient_hard_clipping.py
imports: import unittest
  import numpy
  from chainer import optimizer_hooks
  from chainer import optimizers
  from chainer import testing
  import utils
label_desc: Use image node_id 2 for calling the TestGradientHardClipping obj's underlying member method code with example usage: obj.check_hardclipping(backend_configs) without return types