def get_training_pairs(data_dict, pairs):
    """Returns the subset of pairs which have more than 3 reviews, i.e.
    the set for which we will be able to perform training using `n-1` reviews
    and testing for the last review."""

    training_pairs = []
    for u_id, l_id in pairs:
        if len(data_dict[u_id][l_id]) >= 3:
            training_pairs.append((u_id, l_id))

    return training_pairs