def expandItem(self, itemId, sendChildTree=None):
        if sendChildTree is None:
            success = self.expandItem(itemId, True)
            self.requestRepaint()
            return success
        else:
            # Succeeds if the node is already expanded
            if self.isExpanded(itemId):
                return True

            # Nodes that can not have children are not expandable
            if not self.areChildrenAllowed(itemId):
                return False

            # Expands
            self._expanded.add(itemId)

            self._expandedItemId = itemId
            if self._initialPaint:
                self.requestRepaint()
            elif sendChildTree:
                self.requestPartialRepaint()

            self.fireExpandEvent(itemId)

            return True
Expands an item.
dataset/ETHPy150Open rwl/muntjac/muntjac/ui/tree.py/Tree.expandItem