def METHOD_NAME(n_rows: int, n_cols: int, confmat_sum: Tensor) -> Tuple[Tensor, Tensor]:
    """Compute bias-corrected number of rows and columns."""
    rows_corrected = n_rows - (n_rows - 1) ** 2 / (confmat_sum - 1)
    cols_corrected = n_cols - (n_cols - 1) ** 2 / (confmat_sum - 1)
    return rows_corrected, cols_corrected