text: user_agent_header: str = wikidata_user_agent_header,) -> List[Dict[str, Any]]:    headers = {"Accept": "application/json"}    if wikidata_user_agent_header is not None:        headers["User-Agent"] = wikidata_user_agent_header    response = requests.get(        url, headers=headers, params={"query": query, "format": "json"}    )    if response.status_code != 200:        return "That query failed. Perhaps you could try a different one?"    results = get_nested_value(response.json(), ["results", "bindings"])    return json.dumps(results)run_sparql("SELECT (COUNT(?children) as ?count) WHERE { wd:Q1339 wdt:P40 ?children . }")    '[{"count": {"datatype": "http://www.w3.org/2001/XMLSchema#integer", "type": "literal", "value": "20"}}]'AgentWrap the toolsâ€‹from langchain.agents import (    Tool,    AgentExecutor,    LLMSingleActionAgent,    AgentOutputParser,)from langchain.prompts import StringPromptTemplatefrom langchain import OpenAI, LLMChainfrom typing import List, Unionfrom langchain.schema import AgentAction, AgentFinishimport re# Define which tools the agent can use to answer user queriestools = [    Tool(        name="ItemLookup",        func=(lambda x: vocab_lookup(x, entity_type="item")),        description="useful for when you need to know the q-number for an item",    ),    Tool(