def split(self):
assert(self.status == SolverStatus.exhausted)<EOL>scopes = []<EOL>next_scopes = []<EOL>split_i = None<EOL>for i, scope in enumerate(self.scopes):<EOL><INDENT>if split_i is None:<EOL><INDENT>r = scope.split()<EOL>if r is not None:<EOL><INDENT>scope_, next_scope = r<EOL>scopes.append(scope_)<EOL>next_scopes.append(next_scope)<EOL>split_i = i<EOL>continue<EOL><DEDENT><DEDENT>scopes.append(scope)<EOL>next_scopes.append(scope)<EOL><DEDENT>assert split_i is not None<EOL>phase = copy.copy(self)<EOL>phase.scopes = scopes<EOL>phase.status = SolverStatus.pending<EOL>phase.changed_scopes_i = set([split_i])<EOL>next_phase = copy.copy(phase)<EOL>next_phase.scopes = next_scopes<EOL>return (phase, next_phase)<EOL>
Split the phase.

        When a phase is exhausted, it gets split into a pair of phases to be
        further solved. The split happens like so:
        1) Select the first unsolved package scope.
        2) Find some common dependency in the first N variants of the scope.
        3) Split the scope into two: [:N] and [N:].
        4) Create two copies of the phase, containing each half of the split
           scope.

        The result of this split is that we have a new phase (the first phase),
        which contains a package scope with a common dependency. This
        dependency can now be intersected with the current resolve, thus
        progressing it.

        Returns:
            A 2-tuple of _ResolvePhase objects, where the first phase is the
            best contender for resolving.