code: def append(self, item, parent=None, select=False):
          
          if item in self:
              raise ValueError("item %s already in list" % item)
          if parent is not None:
              giter = self._iter_for(parent)
          else:
              giter = None
          modeliter = self.model.append(giter, (item,))
          self._id_to_iter[id(item)] = modeliter
          if select:
              self.selected_item = item
docs: Add an item to the end of the list.
  
          :param item: The item to be added
          :param parent: The parent item to add this as a child of, or None for
                         a top-level node
          :param select: Whether the item should be selected after adding