code: def test_backward_gpu(self):
      y = self.f(
          chainer.Variable(cuda.to_gpu(self.x)),
          chainer.Variable(cuda.to_gpu(self.x)),
      )
      y.grad = cuda.to_gpu(self.gy)
      self.f.add_hook(self.h)
      y.backward()
      expect = r"""^function\tDummyFunction
  input data
  <variable at 0x[0-9a-f]+>
  - device: <CUDA Device 0>
  - backend: <(type|class) 'cupy._?core.core.ndarray'>
  - shape: \(3L?, 5L?\)
  - dtype: float32
  - statistics: mean=[0-9.\-e]+, std=[0-9.\-e]+
  - grad: None
  \(removed\)
  output gradient
  <variable at 0x[0-9a-f]+>
  - device: <CUDA Device 0>
  - backend: <(type|class) 'cupy._?core.core.ndarray'>
  - shape: \(3L?, 5L?\)
  - dtype: float32
  - statistics: mean=[0-9.\-e]+, std=[0-9.\-e]+
  - grad: mean=[0-9.\-e]+, std=[0-9.\-e]+$
  """
      actual = self.io.getvalue()
      self.assertTrue(re.match(expect, actual), actual)
  
imports: import re
  import unittest
  import numpy
  import six
  import chainer
  from chainer.backends import cuda
  from chainer import function_hooks
  from chainer import testing
  from chainer.testing import attr
label_desc: Use image node_id 5 for calling the TestPrintHookToFunction obj's underlying member method code with example usage: obj.test_backward_gpu() without return types