def advance_to_checkpoint(self, checkpoint):
        """
        Advance to the specified checkpoint, passing all preceding checkpoints including the specified checkpoint.
        """
        if checkpoint in self._checkpoints:
            for cp in self._checkpoints:
                self.insert(cp)
                if cp == checkpoint:
                    return cp
        else:
            raise InvalidCheckpointError(checkpoint)
def advance_to_checkpoint ( self , checkpoint ) : if checkpoint in self . _checkpoints : for cp in self . _checkpoints : self . insert ( cp ) if cp == checkpoint : return cp else : raise InvalidCheckpointError ( checkpoint )
Advance to the specified checkpoint, passing all preceding checkpoints including the specified checkpoint.