class_docstr: Monitor a AnalyticDB Spark session for termination.
  
  :param app_id: identifier of the monitored app depends on the option that's being modified.
  :param adb_spark_conn_id: reference to a pre-defined ADB Spark connection.
  :param region: AnalyticDB MySQL region you want to submit spark application.
class_docstr_tok: ["Monitor","a","AnalyticDB","Spark","session","for","termination",".",":","param","app_id",":","identifier","of","the","monitored","app","depends","on","the","option","that","'s","being","modified",".",":","param","adb_spark_conn_id",":","reference","to","a","pre-defined","ADB","Spark","connection",".",":","param","region",":","AnalyticDB","MySQL","region","you","want","to","submit","spark","application","."]
code: def poke(self, context: Context) -> bool:
      app_id = self.app_id
  
      state = self.hook.get_spark_state(app_id)
      return AppState(state) in AnalyticDBSparkHook.TERMINAL_STATES
  
file_path: airflow/airflow/providers/alibaba/cloud/sensors/analyticdb_spark.py
imports: from __future__ import annotations
  from functools import cached_property
  from typing import TYPE_CHECKING, Any, Sequence
  from deprecated.classic import deprecated
  from airflow.exceptions import AirflowProviderDeprecationWarning
  from airflow.providers.alibaba.cloud.hooks.analyticdb_spark import AnalyticDBSparkHook, AppState
  from airflow.sensors.base import BaseSensorOperator
label_desc: Use image node_id 4 for calling the AnalyticDBSparkSensor obj's underlying member method code with example usage: obj.poke(context) and returns: unknown