code: def test_browser_renderer_show(fig1, renderer):
      pio.renderers.default = renderer
      renderer_obj = pio.renderers[renderer]
      using = renderer_obj.using
      if not isinstance(renderer_obj.using, tuple):
          using = (using,)
  
      # Setup mocks
      mock_get = MagicMock(name="test get")
      mock_browser = MagicMock(name="test browser")
      mock_get.return_value = mock_browser
  
      request_responses = []
  
      def perform_request(url):
          request_responses.append(requests.get(url))
  
      def open_url(url, new=0, autoraise=True):
          print("open url")
          # Perform request in thread so that we don't block
          request_thread = threading.Thread(
              target=lambda: perform_request(url)
          )
          request_thread.daemon = True
          request_thread.start()
  
      mock_browser.open.side_effect = open_url
  
      with mock.patch("webbrowser.get", mock_get):
          pio.show(fig1)
  
      # check get args
      mock_get.assert_any_call(using[0])
  
      # check open args
      mock_call_args = mock_browser.open.call_args
      mock_arg1 = mock_call_args[0][0]
      mock_arg1.startswith("http://127.0.0.1:")
  
      mock_kwargs = mock_call_args[1]
      assert mock_kwargs == dict(
          new=renderer_obj.new, autoraise=renderer_obj.autoraise
      )
  
      # Give request content a little time to show up
      tries = 0
      while tries < 5 and not request_responses:
          time.sleep(0.5)
  
      # Check request content
      assert len(request_responses) == 1
      response = request_responses[0]
      assert response.status_code == 200
      html = response.content.decode("utf8")
      assert_full_html(html)
      assert_offline(html)
      assert_not_requirejs(html)
  
imports: import json
  import sys
  import base64
  import threading
  import time
  import pytest
  import requests
  import numpy
  import webbrowser
  import plotly.graph_objs
  import plotly.io
  from plotly.offline import get_plotlyjs
  from plotly.io._utils import plotly_cdn_url
label_desc: Use image node_id 15 for calling a global function with example usage: test_browser_renderer_show(fig1, renderer) without return types