code: def test_hook_for_childlink(self, test_type):
      # TODO(disktnk): test_type='variable' is failed
      class ChildModel(chainer.Chain):
          def forward(self, x, h):
              if test_type in ["variable", "array"]:
                  h = [chainer.as_variable(h)]
              elif test_type == "dict":
                  h = list(h.values())
              h.append(x)
              return F.stack(h)
  
      class ParentModel(chainer.Chain):
          def __init__(self, get_x):
              super().__init__()
              self.get_x = get_x
              with self.init_scope():
                  self.m = ChildModel()
  
          def forward(self, x):
              h = self.get_x(test_type)
              return self.m(x, h)
  
      model = ParentModel(self.get_x)
      x = self.get_x("variable")
      with RetainInputHook() as h:
          model(x)
      assert len(h.retain_inputs) == 1
  
imports: import unittest
  import chainer
  import chainer.functions
  import chainer.links
  from chainer import testing
  import numpy
  import pytest
  from onnx_chainer import export
  from onnx_chainer.export import RetainInputHook
  from onnx_chainer.testing import input_generator
  from onnx_chainer_tests.helper import ONNXModelTest
label_desc: Use image node_id 3 for calling the TestRetainInputHook obj's underlying member method code with example usage: obj.test_hook_for_childlink(test_type) and returns: F, self