cls,
        state: DagRunState,
        session: Session,
        max_number: int | None = None,
    ) -> list[DagRun]:
        """
        Return the next DagRuns that the scheduler should attempt to schedule.
        This will return zero or more DagRun rows that are row-level-locked with a "SELECT ... FOR UPDATE"
        query, you should ensure that any scheduling decisions are made in a single transaction -- as soon as
        the transaction is committed it will be unlocked.
        """
        from airflow.models.dag import DagModel
        if max_number is None:
            max_number = cls.DEFAULT_DAGRUNS_TO_EXAMINE
        
        query = (