code: def test_quick_start_example(caplog, monkeypatch):
      """This test ensures the Quick Start example properly train and serve PyTorch Lightning."""
      monkeypatch.setattr(
          "logging.getLogger",
          mock.MagicMock(return_value=logging.getLogger()),
      )
  
      with caplog.at_level(logging.INFO):
          with mock.patch("lightning.app.LightningApp", QuickStartApp):
              runner = CliRunner()
              result = runner.invoke(
                  run_app,
                  [
                      os.path.join(
                          _PATH_EXAMPLES,
                          "lightning-quick-start",
                          "app.py",
                      ),
                      "--blocking",
                      "False",
                      "--open-ui",
                      "False",
                  ],
                  catch_exceptions=False,
              )
          assert result.exit_code == 0
  
file_path: pytorch-lightning/tests/integrations_app/public/test_quick_start.py
imports: import logging
  import os
  from unittest import mock
  import pytest
  from click.testing import CliRunner
  from lightning.app import LightningApp
  from lightning.app.cli.lightning_cli import run_app
  from lightning.app.testing.helpers import _RunIf
  from lightning.app.testing.testing import run_app_in_cloud, wait_for
  from integrations_app.public import _PATH_EXAMPLES
label_desc: Use image node_id 1 for calling a global function with example usage: test_quick_start_example(caplog, monkeypatch) without return types