class_docstr: Timetable that schedules DAG runs at specific listed datetimes.
  
  Suitable for predictable but truly irregular scheduling such as sporting events.
  
  :param event_dates: List of datetimes for the DAG to run at. Duplicates will be ignored. Must be finite
                      and of reasonable size as it will be loaded in its entirety.
  :param restrict_to_events: Whether manual runs should use the most recent event or
      the current time
  :param presorted: if True, event_dates will be assumed to be in ascending order. Provides modest
      performance improvement for larger lists of event_dates.
  :param description: A name for the timetable to display in the UI. Default None will be shown as
                      "X Events" where X is the len of event_dates
class_docstr_tok: ["Timetable","that","schedules","DAG","runs","at","specific","listed","datetimes",".","Suitable","for","predictable","but","truly","irregular","scheduling","such","as","sporting","events",".",":","param","event_dates",":","List","of","datetimes","for","the","DAG","to","run","at",".","Duplicates","will","be","ignored",".","Must","be","finite","and","of","reasonable","size","as","it","will","be","loaded","in","its","entirety",".",":","param","restrict_to_events",":","Whether","manual","runs","should","use","the","most","recent","event","or","the","current","time",":","param","presorted",":","if","True",",","event_dates","will","be","assumed","to","be","in","ascending","order",".","Provides","modest","performance","improvement","for","larger","lists","of","event_dates",".",":","param","description",":","A","name","for","the","timetable","to","display","in","the","UI",".","Default","None","will","be","shown","as","``","X","Events","''","where","X","is","the","len","of","event_dates"]
code: def serialize(self):
      return {
          "event_dates": [str(x) for x in self.event_dates],
          "restrict_to_events": self.restrict_to_events,
      }
  
file_path: airflow/airflow/timetables/events.py
imports: from __future__ import annotations
  import itertools
  from typing import TYPE_CHECKING, Iterable
  import pendulum
  from airflow.timetables.base import DagRunInfo, DataInterval, Timetable
  from airflow.utils import timezone
label_desc: Use image node_id 6 for calling the EventsTimetable obj's underlying member method code with example usage: obj.serialize() and returns: dict