code: def forward_cpu(self, inputs):
      bottom_rois, gtop_data = inputs
      channels, height, width = self._bottom_data_shape[1:]
      n_rois = bottom_rois.shape[0]
      bottom_delta = numpy.zeros(
          self._bottom_data_shape, bottom_rois.dtype
      )
  
      for i_roi in six.moves.range(n_rois):
          idx, xmin, ymin, xmax, ymax = bottom_rois[i_roi]
          idx = int(idx)
          xmin = int(round(xmin * self.spatial_scale))
          xmax = int(round(xmax * self.spatial_scale))
          ymin = int(round(ymin * self.spatial_scale))
          ymax = int(round(ymax * self.spatial_scale))
          roi_width = max(xmax - xmin + 1, 1)
          roi_height = max(ymax - ymin + 1, 1)
  
          strideh = float(roi_height) / float(self.outh)
          stridew = float(roi_width) / float(self.outw)
  
          # iterate all the w, h (from feature map) that fall into this ROIs
          for w in six.moves.range(xmin, xmax + 1):
              for h in six.moves.range(ymin, ymax + 1):
                  phstart = int(numpy.floor(float(h - ymin) / strideh))
                  phend = int(numpy.ceil(float(h - ymin + 1) / strideh))
                  pwstart = int(numpy.floor(float(w - xmin) / stridew))
                  pwend = int(numpy.ceil(float(w - xmin + 1) / stridew))
  
                  phstart = min(max(phstart, 0), self.outh)
                  phend = min(max(phend, 0), self.outh)
                  pwstart = min(max(pwstart, 0), self.outw)
                  pwend = min(max(pwend, 0), self.outw)
  
                  for ph in six.moves.range(phstart, phend):
                      for pw in six.moves.range(pwstart, pwend):
                          max_idx_tmp = self.argmax_data[
                              i_roi, :, ph, pw
                          ]
                          for c in six.moves.range(channels):
                              if max_idx_tmp[c] == (h * width + w):
                                  bottom_delta[
                                      idx, c, h, w
                                  ] += gtop_data[i_roi, c, ph, pw]
      return bottom_delta, None
  
imports: import numpy
  import six
  from chainer.backends import cuda
  from chainer import function_node
  from chainer.utils import type_check
label_desc: Use image node_id 2 for calling the ROIPooling2DGrad obj's underlying member method code with example usage: obj.forward_cpu(inputs) and returns: bottom_delta,  None