findNodeIndexById(nodeId) {
        for (let i = 0; i < globalScope.allNodes.length; i++) {
            if (globalScope.allNodes[i].id === nodeId) {
                return i;
            }
        }
        return 'Not found';
    }
Function to find the index of a node in globalScope.allNodes
@param {string} nodeId - id of a node