docs: def trim(self):
          """
          Discard the ancestry of this state.
          """
          new_hist = self.copy({})
          new_hist.parent = None
          self.state.register_plugin('history', new_hist)