class_docstr: Performs a value check using sql code against a minimum threshold and a maximum threshold.
  
  Thresholds can be in the form of a numeric value OR a sql statement that results a numeric.
  
  :param sql: the sql to be executed. (templated)
  :param conn_id: the connection ID used to connect to the database.
  :param database: name of database which overwrite the defined one in connection
  :param min_threshold: numerical value or min threshold sql to be executed (templated)
  :param max_threshold: numerical value or max threshold sql to be executed (templated)
class_docstr_tok: ["Performs","a","value","check","using","sql","code","against","a","minimum","threshold","and","a","maximum","threshold",".","Thresholds","can","be","in","the","form","of","a","numeric","value","OR","a","sql","statement","that","results","a","numeric",".",":","param","sql",":","the","sql","to","be","executed",".","(","templated",")",":","param","conn_id",":","the","connection","ID","used","to","connect","to","the","database",".",":","param","database",":","name","of","database","which","overwrite","the","defined","one","in","connection",":","param","min_threshold",":","numerical","value","or","min","threshold","sql","to","be","executed","(","templated",")",":","param","max_threshold",":","numerical","value","or","max","threshold","sql","to","be","executed","(","templated",")"]
code: def execute(self, context: Context):
      hook = self.get_db_hook()
      result = hook.get_first(self.sql)[0]
      if not result:
          self._raise_exception(
              f"The following query returned zero rows: {self.sql}"
          )
  
      min_threshold = _convert_to_float_if_possible(self.min_threshold)
      max_threshold = _convert_to_float_if_possible(self.max_threshold)
  
      if isinstance(min_threshold, float):
          lower_bound = min_threshold
      else:
          lower_bound = hook.get_first(min_threshold)[0]
  
      if isinstance(max_threshold, float):
          upper_bound = max_threshold
      else:
          upper_bound = hook.get_first(max_threshold)[0]
  
      meta_data = {
          "result": result,
          "task_id": self.task_id,
          "min_threshold": lower_bound,
          "max_threshold": upper_bound,
          "within_threshold": lower_bound <= result <= upper_bound,
      }
  
      self.push(meta_data)
      if not meta_data["within_threshold"]:
          result = (
              round(meta_data.get("result"), 2)  # type: ignore[arg-type]
              if meta_data.get("result") is not None
              else "<None>"
          )
          error_msg = (
              f'Threshold Check: "{meta_data.get("task_id")}" failed.\n'
              f'DAG: {self.dag_id}\nTask_id: {meta_data.get("task_id")}\n'
              f'Check description: {meta_data.get("description")}\n'
              f"SQL: {self.sql}\n"
              f"Result: {result} is not within thresholds "
              f'{meta_data.get("min_threshold")} and {meta_data.get("max_threshold")}'
          )
          self._raise_exception(error_msg)
  
      self.log.info("Test %s Successful.", self.task_id)
  
imports: from __future__ import annotations
  import ast
  import re
  from functools import cached_property
  from typing import TYPE_CHECKING, Any, Callable, Iterable, Mapping, NoReturn, Sequence, SupportsAbs
  from airflow.exceptions import AirflowException, AirflowFailException
  from airflow.hooks.base import BaseHook
  from airflow.models import BaseOperator, SkipMixin
  from airflow.providers.common.sql.hooks.sql import DbApiHook, fetch_all_handler, return_single_query_results
  from airflow.utils.helpers import merge_dicts
label_desc: Use image node_id 2 for calling the SQLThresholdCheckOperator obj's underlying member method code with example usage: obj.execute(context) without return types