def _parse_operation(self, config, crop_size, output_stride,
                       image_pooling_crop_size=None):
    """Parses one operation.

    When 'operation' is 'pyramid_pooling', we compute the required
    hyper-parameters and save in config.

    Args:
      config: A dictionary storing required hyper-parameters for one
        operation.
      crop_size: A list of two integers, [crop_height, crop_width] specifying
        whole patch crop size.
      output_stride: Integer, output stride value for extracted features.
      image_pooling_crop_size: A list of two integers, [crop_height, crop_width]
        specifying the crop size for image pooling operations. Note that we
        decouple whole patch crop_size and image_pooling_crop_size as one could
        perform the image_pooling with different crop sizes.

    Returns:
      A dictionary stores the related information for the operation.
    """
    if config[_OP] == _PYRAMID_POOLING:
      (config[_TARGET_SIZE],
       config[_KERNEL]) = self._get_pyramid_pooling_arguments(
           crop_size=crop_size,
           output_stride=output_stride,
           image_grid=config[_GRID_SIZE],
           image_pooling_crop_size=image_pooling_crop_size)

    return config