def check(self, solution):
return all(constraint.check(solution) for constraint in self.constraints)<EOL>
Check that a solution satisfies all of the constraints.

        Args:
            solution (container):
                An assignment of values for the variables in the constraint satisfaction problem.

        Returns:
            bool: True if the solution satisfies all of the constraints; False otherwise.

        Examples:
            This example creates a binary-valued constraint satisfaction problem, adds
            two logic gates implementing Boolean constraints, :math:`c = a \wedge b`
            and :math:`d = a \oplus c`, and verifies that the combined problem is satisfied
            for a given assignment.

            >>> import dwavebinarycsp
            >>> import dwavebinarycsp.factories.constraint.gates as gates
            >>> csp = dwavebinarycsp.ConstraintSatisfactionProblem(dwavebinarycsp.BINARY)
            >>> csp.add_constraint(gates.and_gate(['a', 'b', 'c']))  # add an AND gate
            >>> csp.add_constraint(gates.xor_gate(['a', 'c', 'd']))  # add an XOR gate
            >>> csp.check({'a': 1, 'b': 0, 'c': 0, 'd': 1})
            True