code: def test_build_single_handler_application_main_py(
      mock_warn: MagicMock,
  ) -> None:
      f = tempfile.NamedTemporaryFile(suffix="main.py", delete=False)
      f.close()  # close file to open it later on windows
      util.build_single_handler_application(f.name)
      assert mock_warn.called
      assert mock_warn.call_args[0] == (
          DIRSTYLE_MAIN_WARNING_COPY,
          None,
      )
      assert mock_warn.call_args[1] == {"stacklevel": 3}
      os.remove(f.name)
  
file_path: bokeh/tests/unit/bokeh/command/test_util__command.py
imports: from __future__ import annotations
  import pytest
  import os
  import tempfile
  from unittest.mock import MagicMock, patch
  from tests.support.util.types import Capture
  import bokeh.command.util
label_desc: Use image node_id 4 for calling a global function with example usage: test_build_single_handler_application_main_py(mock_warn) without return types