class_docstr: A StreamAlert Athena Client for creating tables, databases, and executing queries
  
  Attributes:
      database: Athena database name where tables will be queried
class_docstr_tok: ["A","StreamAlert","Athena","Client","for","creating","tables",",","databases",",","and","executing","queries","Attributes",":","database",":","Athena","database","name","where","tables","will","be","queried"]
docstr: Check in on the running query, back off if the job is running or queued
  
  Args:
      query_execution_id (str): Athena query execution ID
  
  Returns:
      bool: True if the query state is SUCCEEDED, False otherwise
          Reference https://bit.ly/2uuRtda.
  
  Raises:
      AthenaQueryExecutionError: If any failure occurs while checking the status of the
          query, this exception will be raised
docstr_tok: ["Check","in","on","the","running","query",",","back","off","if","the","job","is","running","or","queued","Args",":","query_execution_id","(","str",")",":","Athena","query","execution","ID","Returns",":","bool",":","True","if","the","query","state","is","SUCCEEDED",",","False","otherwise","Reference","https",":","\/\/bit.ly\/2uuRtda",".","Raises",":","AthenaQueryExecutionError",":","If","any","failure","occurs","while","checking","the","status","of","the","query",",","this","exception","will","be","raised"]
code: def check_query_status(self, execution_id):
      """Check in on the running query, back off if the job is running or queued
  
      Args:
          query_execution_id (str): Athena query execution ID
  
      Returns:
          bool: True if the query state is SUCCEEDED, False otherwise
              Reference https://bit.ly/2uuRtda.
  
      Raises:
          AthenaQueryExecutionError: If any failure occurs while checking the status of the
              query, this exception will be raised
      """
      LOGGER.debug(
          "Checking status of query with execution ID: %s", execution_id
      )
  
      states_to_backoff = {"QUEUED", "RUNNING"}
  
      @backoff.on_predicate(
          backoff.fibo,
          lambda resp: resp["QueryExecution"]["Status"]["State"]
          in states_to_backoff,
          max_value=10,
          jitter=backoff.full_jitter,
          on_backoff=backoff_handler(),
          on_success=success_handler(True),
      )
      def _check_status(query_execution_id):
          return self._client.get_query_execution(
              QueryExecutionId=query_execution_id
          )
  
      execution_result = _check_status(execution_id)
      state = execution_result["QueryExecution"]["Status"]["State"]
      if state == "SUCCEEDED":
          return
  
      # When the state is not SUCCEEDED, something bad must have occurred, so raise an exception
      reason = execution_result["QueryExecution"]["Status"][
          "StateChangeReason"
      ]
      raise AthenaQueryExecutionError(
          "Query '{}' {} with reason '{}', exiting".format(
              execution_id, state, reason
          )
      )
  
imports: from datetime import datetime
  import posixpath
  import backoff
  import boto3
  from botocore.exceptions import ClientError
  from streamalert.shared.backoff_handlers import backoff_handler, success_handler
  import streamalert.shared.helpers.boto
  from streamalert.shared.logger import get_logger
label_desc: Use image node_id 9 for calling the AthenaClient obj's underlying member method code with example usage: obj.check_query_status(execution_id) and returns: self