This method is used in DagFileProcessor.process_file - it may be easier to migrate all it's internal calls instead of the whole method.
process_file_calls = 0
            def process_file(self, filepath, only_if_updated=True, safe_mode=True):
                if os.path.basename(filepath) == "example_bash_operator.py":
                    _TestDagBag.process_file_calls += 1
                super().process_file(filepath, only_if_updated, safe_mode)
        dagbag = _TestDagBag(include_examples=True)
        dagbag.process_file_calls
        
        assert 1 == dagbag.process_file_calls
        assert dagbag.get_dag(dag_id) is not None
        assert 1 == dagbag.process_file_calls
    @pytest.mark.parametrize(
        ("file_to_load", "expected"),
        (
            pytest.param(
                TEST_DAGS_FOLDER / "test_zip.zip",
                {
                    "test_zip_dag": "dags/test_zip.zip/test_zip.py",
                    "test_zip_autoregister": "dags/test_zip.zip/test_zip.py",
                },
                id="test_zip.zip",
            ),
            pytest.param(
                pathlib.Path(example_dags_folder) / "example_bash_operator.py",
                {"example_bash_operator": "airflow/example_dags/example_bash_operator.py"},
                id="example_bash_operator",
            ),
            pytest.param(
                TEST_DAGS_FOLDER / "test_subdag.py",