code: def test_streamlit(unittest):
      pytest.importorskip("streamlit")
  
      with ExitStack() as stack:
          build_app_mock = stack.enter_context(
              mock.patch("dtale.app.build_app", mock.Mock())
          )
          try:
              start_listening_mock = stack.enter_context(
                  mock.patch(
                      "streamlit.server.server.start_listening",
                      mock.Mock(),
                  )
              )
          except BaseException:
              start_listening_mock = stack.enter_context(
                  mock.patch(
                      "streamlit.web.server.server.start_listening",
                      mock.Mock(),
                  )
              )
  
          import dtale.cli.streamlit_script as streamlit_script
  
          mock_app = mock.MagicMock()
          streamlit_script.streamlit_server.start_listening(mock_app)
  
          build_app_mock.assert_called_with(reaper_on=False)
          start_listening_mock.assert_called_with(mock_app)
          unittest.assertEqual(
              sys.argv[-4:],
              [
                  "--server.enableCORS",
                  "false",
                  "--server.enableXsrfProtection",
                  "false",
              ],
          )
  
imports: import os
  import sys
  from imp import reload
  import mock
  import pandas
  import pytest
  from six import PY3
  from dtale.cli import loaders, script
  from dtale.cli.clickutils import run
  from dtale.pandas_util import check_pandas_version
  from tests import ExitStack, pdt
label_desc: Use image node_id 11 for calling a global function with example usage: test_streamlit(unittest) without return types