code: def index(self, row, column=0, parent=QModelIndex()):
          
  
          parent_node = self.get_node(parent)
          child = parent_node.child(row)
          if child:
              return self.createIndex(row, column, child)
          else:
              return QModelIndex()
docs: Reimplements the :meth:`QAbstractItemModel.index` method.
  
          :param row: Row.
          :type row: int
          :param column: Column.
          :type column: int
          :param parent: Parent.
          :type parent: QModelIndex
          :return: Index.
          :rtype: QModelIndex