code: def check_forward(self, x_data, roi_data, roi_index_data):
      x = chainer.Variable(x_data)
      rois = chainer.Variable(roi_data)
      roi_indices = chainer.Variable(roi_index_data)
      y = functions.roi_max_pooling_2d(
          x,
          rois,
          roi_indices,
          outsize=self.outsize,
          spatial_scale=self.spatial_scale,
      )
      self.assertEqual(y.data.dtype, self.dtype)
      y_data = cuda.to_cpu(y.data)
  
      self.assertEqual(self.gy.shape, y_data.shape)
  
imports: import unittest
  import numpy
  import chainer
  from chainer.backends import cuda
  from chainer import functions
  from chainer import gradient_check
  from chainer import testing
  from chainer.testing import attr
  from chainer_tests.functions_tests.pooling_tests import pooling_nd_helper
label_desc: Use image node_id 2 for calling the TestROIMaxPooling2D obj's underlying member method code with example usage: obj.check_forward(x_data, roi_data, roi_index_data) without return types