code: def remove_child(self, child):
          
          child.set_model(None)
          if self._model:
              row = self.childItems.index(child)
              parentindex = self._model.index_of_item(self)
              self._model.removeRow(row, parentindex)
          else:
              self.childItems.remove(child)
docs: Remove the child from this TreeItem
  
          :param child: the child TreeItem
          :type child: :class:`TreeItem`
          :returns: None
          :rtype: None
          :raises: ValueError