old_contents: # Copyright (c) 2017 The Regents of the University of Michigan.
  # All Rights Reserved. Licensed according to the terms of the Revised
  # BSD License. See LICENSE.txt for details.
  
  class MutableTree:
  
      def __init__ (self):
          self.child = None
          self.value = None
  
      @property
      def value (self):
          return self.__value
  
      @value.setter
      def value (self, x):
          self.__value = x
  
      def full_length (self):
          return len(self)
  
      def walk (self):
          return iter(())
  
      def __len__ (self):
          return 0 if self.child is None else 1
  
      def __iter__ (self):
          if self:
              return iter((self.child,))
  
          else:
              return iter(())
  
      def __getitem__ (self, index):
          if self and index == 0:
              return self.child
  
          else:
              raise IndexError("tree index out of range")
  
      def __repr__ (self):
          debug = self.__class__.__name__
  
          if self.value is not None:
              debug += " " + repr(self.value)
  
          return "<{}>".format(debug)
  
      def insert (self, index, node):
          self.child = node
  
new_contents: # Copyright (c) 2017 The Regents of the University of Michigan.
  # All Rights Reserved. Licensed according to the terms of the Revised
  # BSD License. See LICENSE.txt for details.
  
  class MutableTree:
  
      def __init__ (self):
          self.child = None
          self.value = None
  
      @property
      def value (self):
          return self.__value
  
      @value.setter
      def value (self, x):
          self.__value = x
  
      def __len__ (self):
          return 0 if self.child is None else 1
  
      def full_length (self):
          return len(self)
  
      def __iter__ (self):
          if self:
              return iter((self.child,))
  
          else:
              return iter(())
  
      def walk (self):
          return iter(())
  
      def __getitem__ (self, index):
          if self and index == 0:
              return self.child
  
          else:
              raise IndexError("tree index out of range")
  
      def __repr__ (self):
          debug = self.__class__.__name__
  
          if self.value is not None:
              debug += " " + repr(self.value)
  
          return "<{}>".format(debug)
  
      def insert (self, index, node):
          self.child = node
  
subject: Move methods