def roc_auc_preprocess(positives, negatives, roc_auc):
    """ROC AUC analysis must be preprocessed using the number of positive and
    negative instances in the entire dataset and the AUC itself.

    Args:
        positives (int): number of positive instances in the dataset
        negatives (int): number of negative instances in the dataset
        roc_auc (float): ROC AUC
    returns:
        (positive, negative) tuple that can be used for `prob_below` and
            `credible_interval`
    """
    unique_combinations = positives * negatives
    # correctly ranked combinations are pairs of positives and negatives
    # instances where the model scored the positive instance higher than the
    # negative instance
    correctly_ranked_combinations = roc_auc * unique_combinations
    # the number of incorrectly ranked combinations is the number of
    # combinations that aren't correctly ranked
    incorrectly_ranked_combinations = (
        unique_combinations - correctly_ranked_combinations
    )
    return correctly_ranked_combinations, incorrectly_ranked_combinations