def drop_unnecessary_metrics(submission_scores: dict, list_of_metrics: list):
    """Return submission_scores with every metric not in list_of_metrics removed."""
    for data_name, data in submission_scores.items():
        if data_name in ["param_count", "submission_name"]:
            continue
        filtered_scores = {k: v for k, v in data.items() if k in list_of_metrics}
        submission_scores[data_name] = filtered_scores
    return submission_scores