"""Check ``schedule_interval`` and ``timetable`` match.
        This is done as a part of the DAG validation done before it's bagged, to
        guard against the DAG's ``timetable`` (or ``schedule_interval``) from
        being changed after it's created, e.g.
        .. code-block:: python
            dag1 = DAG("d1", timetable=MyTimetable())
            dag1.schedule_interval = "@once"
            dag2 = DAG("d2", schedule="@once")
            dag2.timetable = MyTimetable()
        Validation is done by creating a timetable and check its summary matches
        ``schedule_interval``. The logic is not bullet-proof, especially if a
        custom timetable does not provide a useful ``summary``. But this is the
        best we can do.
        """
        if self.schedule_interval == self.timetable.summary:
            return True
        try:
            timetable = create_timetable(self.schedule_interval, self.timezone)
        except ValueError:
            return False
        return timetable.summary == self.timetable.summary
    def validate(self):