from typing import Sequence


def evaluate(y_true: Sequence, y_pred: Sequence, metrics: dict) -> dict:
    """
    Calculates the metrics listed in the ``metrics`` dict.

    Parameters
    ----------
    y_true: Sequence
        sequence of ground truth objects.
    y_pred: Sequence
        sequence of predicted object.
    metrics: dict
        ``dict`` metric names as keys and
        ``callable`` as values with the standard sklearn signature: (y_true, y_pred) -> metric

    Returns
    -------
    calculated_metrics: dict
    """
    return {name: metric(y_true, y_pred) for name, metric in metrics.items()}