code: def __init__(
      self,
      event_name: str,
      has_trigger: bool = True,
      config_data: Callable[..., dict[str, Any]] = lambda: {},
      show_progress: Literal["full", "minimal", "hidden"] = "full",
      callback: Callable | None = None,
      trigger_after: int | None = None,
      trigger_only_on_success: bool = False,
      doc: str = "",
  ):
      super().__init__()
      self.has_trigger = has_trigger
      self.config_data = config_data
      self.event_name = event_name
      self.show_progress = show_progress
      self.trigger_after = trigger_after
      self.trigger_only_on_success = trigger_only_on_success
      self.callback = callback
      self.doc = doc
      self.listener = self._setup(
          event_name,
          has_trigger,
          show_progress,
          callback,
          trigger_after,
          trigger_only_on_success,
      )
      if doc and self.listener.__doc__:
          self.listener.__doc__ = doc + self.listener.__doc__
  
imports: from __future__ import annotations
  import dataclasses
  from functools import partial, wraps
  from typing import TYPE_CHECKING, Any, Callable, Literal, Sequence
  from gradio_client.documentation import document
  from jinja2 import Template
  from gradio.context import Context
  from gradio.utils import get_cancel_function
label_desc: Use image node_id 2 to create a new EventListener object from inherited base classes: str with example: obj = EventListener(event_name, has_trigger, config_data, show_progress, callback, trigger_after, trigger_only_on_success, doc)