def METHOD_NAME(
    *, evaluations: Iterable, metrics: tuple[Metric, ...]
) -> dict[str, dict[str, float]]:
    """
    Takes results and calculates the rank for each of the individual metrics
    Returns a dictionary where the key is the pk of the result, and the
    values is another dictionary where the key is the path of the metric and
    the value is the rank of this result for this metric
    """
    metric_rank = {}
    for metric in metrics:
        # Extract the value of the metric for this primary key and sort on the
        # value of the metric
        metric_scores = {
            e.pk: get_jsonpath(
                get(
                    [
                        o.value
                        for o in e.outputs.all()
                        if o.interface.slug == "metrics-json-file"
                    ]
                ),
                metric.path,
            )
            for e in evaluations
        }
        metric_rank[metric.path] = _scores_to_ranks(
            scores=metric_scores, reverse=metric.reverse
        )
    return {
        e.pk: {
            metric_path: ranks[e.pk]
            for metric_path, ranks in metric_rank.items()
        }
        for e in evaluations
    }