code: def getItem(self, index, altItem=None):
          
          if index.isValid():
              item = index.internalPointer()
              if item:
                  return item
  
          #return altItem if altItem is not None else self.invisibleRootItem # TODO: remove
          return altItem
docs: Returns the TreeItem for the given index. Returns the altItem if the index is invalid.