def detect_node_variables(self, query: str) -> Dict[str, List[str]]:
        """
        Detect node variables.

        Args:
            query: cypher query

        """
        nodes = [self.clean_node(node) for node in re.findall(self.node_pattern, query)]
        res: Dict[str, Any] = {}
        for node in nodes:
            parts = node.split(":")
            if parts == "":
                continue
            variable = parts[0]
            if variable not in res:
                res[variable] = []
            res[variable] += parts[1:]
        return res

        Detect node variables.

        Args:
            query: cypher query

        
llama-index-integrations/graph_stores/llama-index-graph-stores-neo4j/llama_index/graph_stores/neo4j/cypher_corrector.py