<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_decision_tree(self, agent_id, timestamp, version):
 """Tool for the function get_decision_tree. :param str agent_id: the id of the agent to get the tree. It must be an str containing only characters in "a-zA-Z0-9_-" and must be between 1 and 36 characters. :param int timestamp: Optional. The decision tree is comptuted at this timestamp. :default timestamp: None, means that we get the tree computed with all its context history. :param version: version of the tree to get. :type version: str or int :default version: default version of the tree. :return: decision tree. :rtype: dict. """

    headers = self._headers.copy()
    headers["x-craft-ai-tree-version"] = version
    # If we give no timestamp the default behaviour is to give the tree from the latest timestamp
    if timestamp is None:
      req_url = "{}/agents/{}/decision/tree?".format(self._base_url, agent_id)
    else:
      req_url = "{}/agents/{}/decision/tree?t={}".format(self._base_url, agent_id, timestamp)

    resp = self._requests_session.get(req_url)

    decision_tree = self._decode_response(resp)

    return decision_tree