code: def _mne_qt_browser_screenshot(
      browser, inst=None, return_type="pixmap"
  ):
      from mne_qt_browser._pg_figure import QApplication
  
      if getattr(browser, "load_thread", None) is not None:
          if browser.load_thread.isRunning():
              browser.load_thread.wait(30000)
      if inst is None:
          inst = QApplication.instance()
      # processEvents to make sure our progressBar is updated
      with _screenshot_mode(browser):
          for _ in range(2):
              inst.processEvents()
          pixmap = browser.grab()
      assert return_type in ("pixmap", "ndarray")
      if return_type == "ndarray":
          return _pixmap_to_ndarray(pixmap)
      else:
          return pixmap, inst
  
imports: from contextlib import contextmanager
  from ..utils import _pl
  from .backends._utils import _pixmap_to_ndarray
label_desc: Use image node_id 2 for calling a global function with example usage: _mne_qt_browser_screenshot(browser, inst, return_type) and returns: _pixmap_to_ndarray, pixmap,  inst