code: def _tristate_parent(self, item):
          
          self.change_state(item, "tristate")
          parent = self.parent(item)
          if parent:
              self._tristate_parent(parent)
docs: Put the box of item in tristate and change the state of the boxes of
          item's ancestors accordingly.