code: def test_pdf_renderer_show_override(fig1):
      pio.renderers.default = None
  
      # Configure renderer so that we can use the same parameters
      # to build expected image below
      pio.renderers["png"].width = 400
      pio.renderers["png"].height = 500
      pio.renderers["png"].scale = 1
  
      image_bytes_png = pio.to_image(
          fig1, format="png", width=400, height=500, scale=1
      )
  
      image_str_png = base64.b64encode(image_bytes_png).decode("utf8")
  
      with mock.patch("IPython.display.display") as mock_display:
          pio.show(fig1, renderer="png")
  
      expected_bundle = {"image/png": image_str_png}
  
      mock_display.assert_called_once_with(expected_bundle, raw=True)
  
file_path: plotly.py/packages/python/plotly/plotly/tests/test_orca/test_image_renderers.py
imports: import base64
  import sys
  import json
  import pytest
  import numpy
  from plotly import io
  import plotly.graph_objs
  from plotly.offline.offline import _get_jconfig
label_desc: Use image node_id 4 for calling a global function with example usage: test_pdf_renderer_show_override(fig1) without return types