code: def test_jupyter_server_proxy_kill():
      from dtale.views import DtaleData
  
      with ExitStack() as stack:
          stack.enter_context(
              mock.patch("dtale.app.ACTIVE_HOST", "foo")
          )
          stack.enter_context(
              mock.patch("dtale.app.ACTIVE_PORT", 40000)
          )
          stack.enter_context(
              mock.patch("dtale.app.JUPYTER_SERVER_PROXY", True)
          )
          stack.enter_context(
              mock.patch(
                  "dtale.views.in_ipython_frontend", return_value=True
              )
          )
          mock_requests = stack.enter_context(
              mock.patch("requests.get", mock.Mock())
          )
          instance = DtaleData(9999, "user/root/proxy/9999")
          instance.kill()
          mock_requests.assert_called_once_with(
              "http://foo:40000/shutdown"
          )
  
file_path: dtale/tests/dtale/test_instance.py
imports: from collections import namedtuple
  import mock
  import pandas
  import pytest
  from dtale.dash_application.charts import get_url_parser
  from tests import ExitStack
  from tests.dtale import build_data_inst
label_desc: Use image node_id 3 for calling a global function with example usage: test_jupyter_server_proxy_kill() without return types