from typing import Dict


def mrr(benchmark: Dict, results: Dict, repo: str) -> float:
    """
    Calculate the MRR of the prediction for a repo.
    :param benchmark: dictionary with the real libraries from benchmark.
    :param results: dictionary with the predicted libraries.
    :param repo: full name of the repo.
    :return: float of the MRR.
    """
    true_libraries = benchmark[repo]
    suggestions = results[repo]
    for index, req in enumerate(suggestions):
        if req in true_libraries:
            return 1 / (index + 1)
    return 0