code: def to_dict(self):
          
          out = {}
          for key in self.__dict__.keys():
              if key not in ['left', 'right', 'missing', 'parent']:
                  out[key] = self.__dict__[key]
          return out
docs: Return the node as a dictionary.
  
          Returns
          -------
          dict: All the attributes of this node as a dictionary (minus the left
                and right).