from typing import List
from typing import Dict


def filter(metrics: List, restrict_dict: Dict):
    """Filter a list of metrics given a restriction dict"""
    final_metric = []
    for metric in metrics:
        if all(item in metric.get_stats().items() for item in restrict_dict.items()):
            final_metric.append(metric)
    return final_metric