def fix_variable(self, v, value):
if v not in self.variables:<EOL><INDENT>raise ValueError("<STR_LIT>".format(v))<EOL><DEDENT>for constraint in self.variables[v]:<EOL><INDENT>constraint.fix_variable(v, value)<EOL><DEDENT>del self.variables[v]<EOL>
Fix the value of a variable and remove it from the constraint satisfaction problem.

        Args:
            v (variable):
                Variable to be fixed in the constraint satisfaction problem.

            value (int):
                Value assigned to the variable. Values must match the
                :attr:`~.ConstraintSatisfactionProblem.vartype` of the constraint
                satisfaction problem.

        Examples:
            This example creates a spin-valued constraint satisfaction problem, adds two constraints,
            :math:`a = b` and :math:`b \\ne c`, and fixes variable b to +1.

            >>> import dwavebinarycsp
            >>> import operator
            >>> csp = dwavebinarycsp.ConstraintSatisfactionProblem(dwavebinarycsp.SPIN)
            >>> csp.add_constraint(operator.eq, ['a', 'b'])
            >>> csp.add_constraint(operator.ne, ['b', 'c'])
            >>> csp.check({'a': +1, 'b': +1, 'c': -1})
            True
            >>> csp.check({'a': -1, 'b': -1, 'c': +1})
            True
            >>> csp.fix_variable('b', +1)
            >>> csp.check({'a': +1, 'b': +1, 'c': -1})  # 'b' is ignored
            True
            >>> csp.check({'a': -1, 'b': -1, 'c': +1})
            False
            >>> csp.check({'a': +1, 'c': -1})
            True
            >>> csp.check({'a': -1, 'c': +1})
            False