class_docstr: Poll the task state until it reaches a terminal state; raises AirflowException with the failure reason.
  
  .. seealso::
      For more information on how to use this operator, take a look at the guide:
      :ref:`howto/sensor:EcsTaskStateSensor`
  
  :param cluster: The short name or full Amazon Resource Name (ARN) of the cluster that hosts the task.
  :param task: The task ID or full ARN of the task to poll.
  :param target_state: Success state to watch for. (Default: "ACTIVE")
  :param failure_states: Fail if any of these states are reached before
       the Success State. (Default: "STOPPED")
code: def poke(self, context: Context):
      task_state = EcsTaskStates(
          self.hook.get_task_state(cluster=self.cluster, task=self.task)
      )
  
      self.log.info(
          "Task state: %s, waiting for: %s",
          task_state,
          self.target_state,
      )
      _check_failed(
          task_state,
          self.target_state,
          self.failure_states,
          self.soft_fail,
      )
      return task_state == self.target_state
  
imports: from __future__ import annotations
  from functools import cached_property
  from typing import TYPE_CHECKING, Sequence
  from airflow.exceptions import AirflowException, AirflowSkipException
  from airflow.providers.amazon.aws.hooks.ecs import EcsClusterStates, EcsHook, EcsTaskDefinitionStates, EcsTaskStates
  from airflow.providers.amazon.aws.sensors.base_aws import AwsBaseSensor
  from airflow.providers.amazon.aws.utils.mixins import aws_template_fields
label_desc: Use image node_id 2 for calling the EcsTaskStateSensor obj's underlying member method code with example usage: obj.poke(context) and returns: unknown