def test_graphs(self):
        """
        Test whether unordered graph systems are created correctly.
        """
        for example in self.examples:
            constraints, expected, gold_counts = example
            c = ConstraintNode.create(constraints)
            assert (
                ConstraintNode.print_graph(c) == expected
            ), f"got {ConstraintNode.print_graph(c)}, expected {expected}"
            assert (
                c.token_counts() == gold_counts
            ), f"{c} got {c.token_counts()} wanted {gold_counts}"

        Test whether unordered graph systems are created correctly.
        
decoding/IAD/fairseq/tests/test_constraints.py