code: def _qt_is_dark(widget):
      # Ideally this would use CIELab, but this should be good enough
      win = widget.window()
      bgcolor = win.palette().color(win.backgroundRole()).getRgbF()[:3]
      return rgb_to_hls(*bgcolor)[1] < 0.5
  
imports: import collections.abc
  import functools
  import os
  import platform
  import signal
  import sys
  from colorsys import rgb_to_hls
  from contextlib import contextmanager
  from ctypes import c_char_p, c_void_p, cdll
  from pathlib import Path
  import numpy
  from ...fixes import _compare_version
  from ...utils import _check_qt_version, _validate_type, logger, warn
  from ..utils import _get_cmap
label_desc: Use image node_id 13 for calling a global function with example usage: _qt_is_dark(widget) and returns: unknown