code: def _check_qt_version(*, return_api=False, check_usable_display=True):
      """Check if Qt is installed."""
      from ..viz.backends._utils import _init_mne_qtapp
  
      try:
          from qtpy import API_NAME as api
          from qtpy import QtCore
      except Exception:
          api = version = None
      else:
          try:  # pyside
              version = QtCore.__version__
          except AttributeError:
              version = QtCore.QT_VERSION_STR
          # Having Qt installed is not enough -- sometimes the app is unusable
          # for example because there is no usable display (e.g., on a server),
          # so we have to try instantiating one to actually know.
          if check_usable_display:
              try:
                  _init_mne_qtapp()
              except Exception:
                  api = version = None
      if return_api:
          return version, api
      else:
          return version
  
imports: import numbers
  import operator
  import os
  import re
  from builtins import input
  from difflib import get_close_matches
  from importlib import import_module
  from pathlib import Path
  import numpy
  from ..defaults import HEAD_SIZE_DEFAULT, _handle_default
  from ..fixes import _compare_version, _median_complex
  from ._logging import _record_warnings, _verbose_safe_false, logger, verbose, warn
label_desc: Use image node_id 42 for calling a global function with example usage: _check_qt_version() and returns: version,  api, version