@staticmethod
def _make_constraints(cosets):
    """
        Turn cosets into constraints.
        """
    constraints = set()
    for node_i, node_ts in cosets.items():
        for node_t in node_ts:
            if node_i != node_t:
                constraints.add((node_i, node_t))
    return constraints
