code: def test_get_screenshot_as_png(
      webdriver: WebDriver, dimensions: tuple[int, int]
  ) -> None:
      if sys.platform == "darwin" and webdriver.name == "firefox":
          pytest.skip(reason="unreliable on MacOS and Firefox")
  
      width, height = dimensions
      border = 5
  
      layout = Plot(
          x_range=Range1d(),
          y_range=Range1d(),
          height=width,
          width=height,
          min_border=border,
          hidpi=False,
          toolbar_location=None,
          outline_line_color=None,
          background_fill_color="#00ff00",
          border_fill_color="#00ff00",
      )
  
      with silenced(MISSING_RENDERERS):
          png = bie.get_screenshot_as_png(layout, driver=webdriver)
  
      # a WxHpx image of white pixels
      assert png.size == (width, height)
  
      data = png.tobytes()
      assert len(data) == 4 * width * height
      assert data == b"\x00\xff\x00\xff" * width * height
  
imports: from __future__ import annotations
  import pytest
  import base64
  import re
  import sys
  from typing import TYPE_CHECKING
  from bokeh.core.validation import silenced
  from bokeh.core.validation.warnings import MISSING_RENDERERS
  from bokeh.io.state import curstate
  from bokeh.io.webdriver import webdriver_control
  from bokeh.layouts import row
  from bokeh.models import Circle, ColumnDataSource, Div, Plot, Range1d, Rect
  from bokeh.plotting import figure
  from bokeh.resources import Resources
  from bokeh.themes import Theme
  import bokeh.io.export
label_desc: Use image node_id 3 for calling a global function with example usage: test_get_screenshot_as_png(webdriver, dimensions) without return types