def extract_node_variable(self, part: str) -> Optional[str]:
        """
        Args:
            part: node in string format.

        """
        part = part.lstrip("(").rstrip(")")
        idx = part.find(":")
        if idx != -1:
            part = part[:idx]
        return None if part == "" else part

        Args:
            part: node in string format.

        
llama-index-integrations/tools/llama-index-tools-neo4j/llama_index/tools/neo4j/query_validator.py