Returns the Node at given index.

        :param index: Index.
        :type index: QModelIndex
        :return: Node.
        :rtype: AbstractCompositeNode

def get_node(self, index):
        """
        Returns the Node at given index.

        :param index: Index.
        :type index: QModelIndex
        :return: Node.
        :rtype: AbstractCompositeNode
        """

        index = self.mapToSource(index)
        if not index.isValid():
            return self.sourceModel().root_node

        return index.internalPointer() or self.sourceModel().root_node