code: def can_import(api):
      
      if not has_binding(api):
          return False
  
      current = loaded_api()
      if api == QT_API_PYQT_DEFAULT:
          return current in [QT_API_PYQT, QT_API_PYQTv1, QT_API_PYQT5, None]
      else:
          return current in [api, None]
docs: Safely query whether an API is importable, without importing it