code: def check_backward(self, x_data, roi_data, roi_index_data, y_grad):
      def f(x, rois, roi_indices):
          y = functions.roi_max_align_2d(
              x,
              rois,
              roi_indices,
              outsize=self.outsize,
              spatial_scale=self.spatial_scale,
              sampling_ratio=self.sampling_ratio,
          )
          xp = chainer.backend.get_array_module(y)
          y = functions.where(
              xp.isinf(y.array), xp.zeros(y.shape, dtype=y.dtype), y
          )
          return y
  
      gradient_check.check_backward(
          f,
          (x_data, roi_data, roi_index_data),
          y_grad,
          no_grads=[False, True, True],
          **self.check_backward_options,
      )
  
imports: import unittest
  import numpy
  import chainer
  from chainer import cuda
  from chainer import functions
  from chainer import gradient_check
  from chainer import testing
  from chainer.testing import attr
  from chainer.testing import condition
  from chainer_tests.functions_tests.pooling_tests import pooling_nd_helper
label_desc: Use image node_id 6 for calling the TestROIMaxAlign2D obj's underlying member method code with example usage: obj.check_backward(x_data, roi_data, roi_index_data, y_grad) and returns: y