code: def undo_last_change(self):
          
          if len(self.history) == 0:
              raise IndexError("Can't undo. Already at oldest change.")
          if 'input_structure' not in self.history[-1]:
              raise IndexError("Can't undo. Latest history has no "
                               "input_structure")
          h = self.history.pop()
          self._undone.append((h, self.final_structure))
          s = h["input_structure"]
          if isinstance(s, dict):
              s = Structure.from_dict(s)
          self.final_structure = s
docs: Undo the last change in the TransformedStructure.
  
          Raises:
              IndexError: If already at the oldest change.