code: def _check_local_hook(self, add_hook_name, delete_hook_name):
      model, x, dot = self._create_model_and_data()
      hook = MyLinkHook()
  
      model.add_hook(hook, add_hook_name)
      model(chainer.Variable(x), "foo", test2="bar")
      model.delete_hook(delete_hook_name)
  
      # added
      assert len(hook.added_args) == 1
      assert hook.added_args[0][1] is model
  
      # deleted
      assert len(hook.added_args) == 1
      assert hook.deleted_args[0][1] is model
  
      # forward_preprocess
      assert len(hook.forward_preprocess_args) == 1
      # - MyModel
      args = hook.forward_preprocess_args[0][1]
      assert args.link is model
      assert args.forward_name == "forward"
      assert len(args.args) == 2
      numpy.testing.assert_array_equal(args.args[0].data, x)
      assert args.args[1] == "foo"
      assert len(args.kwargs) == 1
      assert args.kwargs["test2"] == "bar"
  
      # forward_postprocess
      assert len(hook.forward_postprocess_args) == 1
      # - MyModel
      args = hook.forward_postprocess_args[0][1]
      assert args.link is model
      assert args.forward_name == "forward"
      assert len(args.args) == 2
      numpy.testing.assert_array_equal(args.args[0].data, x)
      assert args.args[1] == "foo"
      assert len(args.kwargs) == 1
      assert args.kwargs["test2"] == "bar"
      numpy.testing.assert_array_equal(args.out.data, dot)
  
imports: import time
  import unittest
  import numpy
  import chainer
  from chainer import testing
label_desc: Use image node_id 4 for calling the TestLinkHook obj's underlying member method code with example usage: obj._check_local_hook(add_hook_name, delete_hook_name) without return types