def METHOD_NAME(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)