code: def test_notebook_connected_show(fig1, name, connected):
      # Set renderer
      pio.renderers.default = name
  
      # Show
      with mock.patch(
          "IPython.display.display_html"
      ) as mock_display_html:
          with mock.patch("IPython.display.display") as mock_display:
              pio.show(fig1)
  
      # ### Check initialization ###
      # Get display call arguments
      mock_call_args_html = mock_display_html.call_args
      mock_arg1_html = mock_call_args_html[0][0]
  
      # Check init display contents
      bundle_display_html = mock_arg1_html
      if connected:
          assert_html_renderer_connected(bundle_display_html)
      else:
          assert_offline(bundle_display_html)
  
      # ### Check display call ###
      # Get display call arguments
      mock_call_args = mock_display.call_args
      mock_arg1 = mock_call_args[0][0]
  
      # Check for html bundle
      assert list(mock_arg1) == ["text/html"]
  
      # Check html display contents
      bundle_html = mock_arg1["text/html"]
      assert_not_full_html(bundle_html)
      assert_requirejs(bundle_html)
  
      # check kwargs
      mock_kwargs = mock_call_args[1]
      assert mock_kwargs == {"raw": True}
  
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 14 for calling a global function with example usage: test_notebook_connected_show(fig1, name, connected) without return types