code: def test_start_stop_server_through_frontend(process_mock):
      frontend = StaticWebFrontend(serve_dir=".")
      frontend.flow = MockFlow()
      frontend.start_server("localhost", 5000)
      log_file_root = _storage_root_dir()
      process_mock.assert_called_once_with(
          target=lightning.app.frontend.web._start_server,
          kwargs={
              "host": "localhost",
              "port": 5000,
              "serve_dir": ".",
              "path": "/root.my.flow",
              "log_file": os.path.join(
                  log_file_root, "frontend", "logs.log"
              ),
              "root_path": "",
          },
      )
      process_mock().start.assert_called_once()
      frontend.stop_server()
      process_mock().kill.assert_called_once()
  
file_path: pytorch-lightning/tests/tests_app/frontend/test_web.py
imports: import os
  from unittest import mock
  from unittest.mock import ANY, MagicMock
  import lightning.app
  import pytest
  from lightning.app import LightningFlow
  from lightning.app.frontend.web import StaticWebFrontend, _healthz
  from lightning.app.storage.path import _storage_root_dir
label_desc: Use image node_id 2 for calling a global function with example usage: test_start_stop_server_through_frontend(process_mock) without return types