code: def check_forward(self, y):
      y = F.upsampling_2d(
          self.pooled_y,
          self.indices,
          ksize=self.ksize,
          stride=self.stride,
          outsize=self.in_shape[2:],
      )
      if isinstance(y.array, numpy.ndarray):
          y = conv.im2col_cpu(
              y.array,
              self.ksize,
              self.ksize,
              self.stride,
              self.stride,
              0,
              0,
          )
      else:
          y = conv.im2col_gpu(
              y.array,
              self.ksize,
              self.ksize,
              self.stride,
              self.stride,
              0,
              0,
          )
      for i in numpy.ndindex(y.shape):
          n, c, ky, kx, oy, ox = i
          up_y = y[n, c, ky, kx, oy, ox]
          if ky * y.shape[3] + kx == self.indices[n, c, oy, ox]:
              in_y = self.pooled_y.array[n, c, oy, ox]
              testing.assert_allclose(in_y, up_y)
          else:
              testing.assert_allclose(up_y, 0)
  
imports: import unittest
  import numpy
  import chainer
  from chainer.backends import cuda
  import chainer.functions
  from chainer import gradient_check
  from chainer import testing
  from chainer.testing import attr
  from chainer.utils import conv
label_desc: Use image node_id 2 for calling the TestUpsampling2D obj's underlying member method code with example usage: obj.check_forward(y) without return types