Returns given Node index.

        :param node: Node.
        :type node: AbstractCompositeNode or GraphModelNode
        :return: Index.
        :rtype: QModelIndex

def get_node_index(self, node):
        """
        Returns given Node index.

        :param node: Node.
        :type node: AbstractCompositeNode or GraphModelNode
        :return: Index.
        :rtype: QModelIndex
        """

        if node == self.__root_node:
            return QModelIndex()
        else:
            row = node.row()
            return self.createIndex(row, 0, node) if row is not None else QModelIndex()