This method is used in DagFileProcessor.process_file - it may be easier to migrate all it's internal calls instead of the whole method.
self,
        dag_folder: str | pathlib.Path | None = None,
        include_examples: bool | ArgNotSet = NOTSET,
        safe_mode: bool | ArgNotSet = NOTSET,
        read_dags_from_db: bool = False,
        store_serialized_dags: bool | None = None,
        load_op_links: bool = True,
        collect_dags: bool = True,
    ):
        
        from airflow.models.dag import DAG
        super().__init__()
        include_examples = (
            include_examples
            if isinstance(include_examples, bool)
            else conf.getboolean("core", "LOAD_EXAMPLES")
        )
        safe_mode = (
            safe_mode if isinstance(safe_mode, bool) else conf.getboolean("core", "DAG_DISCOVERY_SAFE_MODE")
        )
        if store_serialized_dags:
            warnings.warn(