from typing import List


def calculate_node_correctness(pairs: List, num_correspondence: int) -> float:
    """
    Calculate node correctness given estimated correspondences
    Args:
        pairs: a list of pairs of nodes
        num_correspondence: the real number of correspondences

    Returns:
        node_correctness: the percentage of correctly-matched nodes
    """
    node_correctness = 0
    for pair in pairs:
        if pair[0] == pair[1]:
            node_correctness += 1
    node_correctness /= num_correspondence
    return node_correctness