This method is used in DagFileProcessor.process_file - it may be easier to migrate all it's internal calls instead of the whole method.
mock_sync_perm_for_dag.reset_mock()
                dagbag._sync_perm_for_dag(dag, session=session)
            
            _sync_perms()
            mock_sync_perm_for_dag.assert_called_once_with("test_example_bash_operator", None)
            
            _sync_perms()
            mock_sync_perm_for_dag.assert_not_called()
            
            dag.access_control = {"Public": {"can_read"}}
            _sync_perms()
            mock_sync_perm_for_dag.assert_called_once_with(
                "test_example_bash_operator", {"Public": {"can_read"}}
            )
    @patch("airflow.models.dagbag.settings.MIN_SERIALIZED_DAG_UPDATE_INTERVAL", 5)
    @patch("airflow.models.dagbag.settings.MIN_SERIALIZED_DAG_FETCH_INTERVAL", 5)
    def test_get_dag_with_dag_serialization(self):