code: def poke_mode_only(cls):
      """
      Decorate a subclass of BaseSensorOperator with poke.
  
      Indicate that instances of this class are only safe to use poke mode.
  
      Will decorate all methods in the class to assert they did not change
      the mode from 'poke'.
  
      :param cls: BaseSensor class to enforce methods only use 'poke' mode.
      """
  
      def decorate(cls_type):
          def mode_getter(_):
              return "poke"
  
          def mode_setter(_, value):
              if value != "poke":
                  raise ValueError(
                      f"Cannot set mode to '{value}'. Only 'poke' is acceptable"
                  )
  
          if not issubclass(cls_type, BaseSensorOperator):
              raise ValueError(
                  f"poke_mode_only decorator should only be "
                  f"applied to subclasses of BaseSensorOperator,"
                  f" got:{cls_type}."
              )
  
          cls_type.mode = property(mode_getter, mode_setter)
  
          return cls_type
  
      return decorate(cls)
  
imports: from __future__ import annotations
  import datetime
  import functools
  import hashlib
  import logging
  import time
  import traceback
  from datetime import timedelta
  from typing import TYPE_CHECKING, Any, Callable, Iterable
  from airflow import settings
  from airflow.configuration import conf
  from airflow.exceptions import AirflowException, AirflowFailException, AirflowRescheduleException, AirflowSensorTimeout, AirflowSkipException, AirflowTaskTimeout, TaskDeferralError
  from airflow.executors.executor_loader import ExecutorLoader
  from airflow.models.baseoperator import BaseOperator
  from airflow.models.skipmixin import SkipMixin
  from airflow.models.taskreschedule import TaskReschedule
  from airflow.ti_deps.deps.ready_to_reschedule import ReadyToRescheduleDep
  from airflow.utils import timezone
  from airflow.utils.decorators import apply_defaults
  from airflow.utils.session import create_session
label_desc: Use image node_id 2 for calling a global function with example usage: poke_mode_only(cls) and returns: decorate, cls_type, str