def are_equal_nodes(n1, n2):
    """Returns True if nodes n1 and n2 have the same predicate and sortinfo."""
    return (n1.pred == n2.pred and n1.sortinfo == n2.sortinfo and n1.carg ==
        n2.carg)
