code: def check_forward(self, x_data):
      x = chainer.Variable(x_data)
      W_f = cuda.to_cpu(self.mgu.W_f.W.data)
      W_h = cuda.to_cpu(self.mgu.W_h.W.data)
      with chainer.using_config("dtype", self.dtype):
          y1 = self.mgu(x)
          y2 = self.mgu(x)
  
      h = numpy.zeros(self.out_size, dtype=self.dtype)
      for i in six.moves.range(3):
          h1 = mgu(W_f, W_h, h, self.x[i])
          testing.assert_allclose(h1, y1.data[i], **self.forward_tols)
          h2 = mgu(W_f, W_h, h1, self.x[i])
          testing.assert_allclose(h2, y2.data[i], **self.forward_tols)
  
imports: import unittest
  import numpy
  import six
  import chainer
  from chainer.backends import cuda
  from chainer import links
  from chainer import testing
  from chainer.testing import attr
label_desc: Use image node_id 2 for calling the TestStatefulMGU obj's underlying member method code with example usage: obj.check_forward(x_data) without return types