This method is used in DagFileProcessor.process_file - it may be easier to migrate all it's internal calls instead of the whole method.
"""Result of running ``DagFileProcessor.process_file()``."""
        if not self.done:
            raise AirflowException("Tried to get the result before it's done!")
        return self._result
    @property
    def start_time(self) -> datetime:
        """Time when this started to process the file."""
        if self._start_time is None:
            raise AirflowException("Tried to get start time before it started!")
        return self._start_time
    @property
    def waitable_handle(self):
        return self._process.sentinel
class DagFileProcessor(LoggingMixin):
    """
    Process a Python file containing Airflow DAGs.
    This includes:
    1. Execute the file and look for DAG objects in the namespace.
    2. Execute any Callbacks if passed to DagFileProcessor.process_file
    3. Serialize the DAGs and save it to DB (or update existing record in the DB).
    4. Pickle the DAG and save it to the DB (if necessary).
    5. Record any errors importing the file into ORM
    Returns a tuple of 'number of dags found' and 'the count of import errors'
    :param dag_ids: If specified, only look at these DAG ID's
    :param log: Logger to save the processing process
    """
    UNIT_TEST_MODE: bool = conf.getboolean("core", "UNIT_TEST_MODE")
    def __init__(self, dag_ids: list[str] | None, dag_directory: str, log: logging.Logger):