def crossover_with(self, other, points=<NUM_LIT:2>):
assert isinstance(other, BitCondition)<EOL>assert len(self) == len(other)<EOL>template = BitString.crossover_template(len(self), points)<EOL>inv_template = ~template<EOL>bits1 = (self._bits & template) | (other._bits & inv_template)<EOL>mask1 = (self._mask & template) | (other._mask & inv_template)<EOL>bits2 = (self._bits & inv_template) | (other._bits & template)<EOL>mask2 = (self._mask & inv_template) | (other._mask & template)<EOL>return type(self)(bits1, mask1), type(self)(bits2, mask2)<EOL>
Perform 2-point crossover on this bit condition and another of
        the same length, returning the two resulting children.

        Usage:
            offspring1, offspring2 = condition1.crossover_with(condition2)

        Arguments:
            other: A second BitCondition of the same length as this one.
            points: An int, the number of crossover points of the
                crossover operation.
        Return:
            A tuple (condition1, condition2) of BitConditions, where the
            value at each position of this BitCondition and the other is
            preserved in one or the other of the two resulting conditions.