code: def test_generate_config():
      td = mkdtemp()
      app = DummyApp(config_dir=td)
      app.initialize(["--generate-config"])
      assert app.generate_config
  
      with pytest.raises(NoStart):
          app.start()
  
      assert os.path.exists(os.path.join(td, "dummy_app_config.py"))
  
imports: from __future__ import annotations
  import asyncio
  import os
  import shutil
  from tempfile import mkdtemp
  from unittest.mock import patch
  import pytest
  from traitlets import Integer
  from jupyter_core.application import JupyterApp, JupyterAsyncApp, NoStart
  from jupyter_core.utils import ensure_event_loop
label_desc: Use image node_id 5 for calling a global function with example usage: test_generate_config() without return types