def ablate(self, x: np.ndarray, column_pos: int, row_pos: int) -> np.ndarray:
        """
        Ablates the image only retaining a block starting at (row_pos, column_pos) of height/width "self.ablation_size"

        :param x: input data
        :param row_pos: Specifies the row index where to retain the image block.
        :param column_pos: Specifies the column index where to retain the image block.
        :return: Data ablated at all locations aside from the specified block.
        """
        k = self.ablation_size
        # Column ablations
        if column_pos + k > x.shape[-1]:
            x[:, :, :, (column_pos + k) % x.shape[-1] : column_pos] = 0.0
        else:
            x[:, :, :, :column_pos] = 0.0
            x[:, :, :, column_pos + k :] = 0.0

        # Row ablations
        if row_pos + k > x.shape[-2]:
            x[:, :, (row_pos + k) % x.shape[-2] : row_pos, :] = 0.0
        else:
            x[:, :, :row_pos, :] = 0.0
            x[:, :, row_pos + k :, :] = 0.0
        return x

        Ablates the image only retaining a block starting at (row_pos, column_pos) of height/width "self.ablation_size"

        :param x: input data
        :param row_pos: Specifies the row index where to retain the image block.
        :param column_pos: Specifies the column index where to retain the image block.
        :return: Data ablated at all locations aside from the specified block.
        
art/estimators/certification/derandomized_smoothing/ablators/tensorflow.py