code: def get_decision_trees_bulk(self, payload, version=DEFAULT_DECISION_TREE_VERSION):
      
      # payload = [{"id": agent_id, "timestamp": timestamp}]
      headers = self._headers.copy()
      headers["x-craft-ai-tree-version"] = version
  
      # Check all ids, raise an error if all ids are invalid
      valid_indices, invalid_indices, invalid_dts = self._check_agent_id_bulk(payload)
  
      if self._config["decisionTreeRetrievalTimeout"] is False:
        # Don't retry
        return self._get_decision_trees_bulk(payload,
                                             valid_indices,
                                             invalid_indices,
                                             invalid_dts)
      start = current_time_ms()
      while True:
        now = current_time_ms()
        if now - start > self._config["decisionTreeRetrievalTimeout"]:
          # Client side timeout
          raise CraftAiLongRequestTimeOutError()
        try:
          return self._get_decision_trees_bulk(payload,
                                               valid_indices,
                                               invalid_indices,
                                               invalid_dts)
        except CraftAiLongRequestTimeOutError:
          # Do nothing and continue.
          continue
docs: Get a group of decision trees.
  
      :param list payload: contains the informations necessary for getting
      the trees. It's in the form [{"id": agent_id, "timestamp": timestamp}]
      With id a str containing only characters in "a-zA-Z0-9_-" and must be
      between 1 and 36 characters. It must referenced an existing agent.
      With timestamp an positive and not null integer.
      :param version: version of the tree to get.
      :type version: str or int.
      :default version: default version of the tree.
  
      :return: Decision trees.
      :rtype: list of dict.
  
      :raises CraftAiBadRequestError: if all of the ids are invalid or
      referenced non existing agents or all of the timestamp are invalid.
      :raises CraftAiLongRequestTimeOutError: if the API doesn't get
      the tree in the time given by the configuration.