def _push_new_state(self):
        """Push a new state into history.

        This new state will be used to hold resolution results of the next
        coming round.
        """
        try:
            base = self._states[-1]
        except IndexError:
            state = State(mapping=collections.OrderedDict(), criteria={})
        else:
            state = State(
                mapping=base.mapping.copy(), criteria=base.criteria.copy(),
            )
        self._states.append(state)
Push a new state into history.

        This new state will be used to hold resolution results of the next
        coming round.
        
product/gradle-plugin/src/main/python/pip/_vendor/resolvelib/resolvers.py