This method is used in DagFileProcessor.process_file - it may be easier to migrate all it's internal calls instead of the whole method.
"""
        Get DAG ids.
        :return: a list of DAG IDs in this bag
        """
        return list(self.dags.keys())
    @provide_session
    def get_dag(self, dag_id, session: Session = None):
        """
        Gets the DAG out of the dictionary, and refreshes it if expired
        :param dag_id: DAG ID
        """
        
        from airflow.models.dag import DagModel
        if self.read_dags_from_db:
            
            from airflow.models.serialized_dag import SerializedDagModel
            if dag_id not in self.dags:
                
                self._add_dag_from_db(dag_id=dag_id, session=session)
                return self.dags.get(dag_id)
            
            
            
            
            
            
            min_serialized_dag_fetch_secs = timedelta(seconds=settings.MIN_SERIALIZED_DAG_FETCH_INTERVAL)
            if (
                dag_id in self.dags_last_fetched
                and timezone.utcnow() > self.dags_last_fetched[dag_id] + min_serialized_dag_fetch_secs