def METHOD_NAME(self, feature_map, rois):
    """
    Args:
      feature_map: [batch_size, H, W, C] float Tensor, the feature map
        extracted from image.
      rois: [batch_size, N, 4] float Tensor, the region of interests to be
        pooled.
    Returns:
      pooled_feature_map: [batch_size, N, target_size, C] float Tensor
    """
    # convert to relative format given feature map shape != image shape
    rois = bounding_box.convert_format(
        rois,
        source=self.bounding_box_format,
        target="rel_yxyx",
        image_shape=self.image_shape,
    )
    pooled_feature_map = tf.vectorized_map(
        self._pool_single_sample, (feature_map, rois)
    )
    return pooled_feature_map