def _equal(name_pairs, candidates):
    """
    name_pairs : ground truth
    candidates : identified (f,v) pairs
    Check whether identified (f,v) pairs are the same as ground truth.
    """
    if len(name_pairs) != len(candidates):
        return False
    return name_pairs == candidates