def same_entity(cluster, argument, graph):
    """
    Receives a cluster and an argument mention and returns whether this argument mention
    is similar to the cluster, i.e. if the arguments in the clusters are all mentions of the same
    coreference chain.
    :param cluster: the cluster of mentions
    :param argument: the mention
    :param graph: the OKR graph
    :return: whether this argument mention is similar to the cluster.
    """
    match = []

    for m in cluster:

        # Entity argument
        if m.parent_id in graph.entities and argument.parent_id in graph.entities:
            val = str(graph.entities[m.parent_id]) == str(graph.entities[argument.parent_id])

        # Predicate argument
        elif m.parent_id in graph.propositions and argument.parent_id in graph.propositions:
            val = str(graph.propositions[m.parent_id]) == str(graph.propositions[argument.parent_id])

        else:
            return False

        match.append(val)

    return all(match)