code: def check_backward(
      self, x_data, roi_data, roi_index_data, y_grad_data
  ):
      def f(x, rois, roi_indices):
          y = functions.ps_roi_max_align_2d(
              x,
              rois,
              roi_indices,
              self.outsize,
              self.spatial_scale,
              self.group_size,
              sampling_ratio=self.sampling_ratio,
          )
          xp = cuda.get_array_module(y)
          y = F.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_data,
          no_grads=[False, True, True],
          **self.check_backward_options,
      )
  
imports: 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.testing import condition
  import numpy
  import unittest
  from chainercv import functions
  from tests.functions_tests.test_ps_roi_average_pooling_2d import _outsize
label_desc: Use image node_id 5 for calling the TestPSROIMaxAlign2D obj's underlying member method code with example usage: obj.check_backward(x_data, roi_data, roi_index_data, y_grad_data) and returns: y