code: def commit_api(api):
      """Commit to a particular API, and trigger ImportErrors on subsequent
      dangerous imports"""
  
      if api == QT_API_PYSIDE2:
          ID.forbid("PySide")
          ID.forbid("PyQt4")
          ID.forbid("PyQt5")
      if api == QT_API_PYSIDE:
          ID.forbid("PySide2")
          ID.forbid("PyQt4")
          ID.forbid("PyQt5")
      elif api == QT_API_PYQT5:
          ID.forbid("PySide2")
          ID.forbid("PySide")
          ID.forbid("PyQt4")
      else:  # There are three other possibilities, all representing PyQt4
          ID.forbid("PyQt5")
          ID.forbid("PySide2")
          ID.forbid("PySide")
  
imports: import sys
  import types
  from functools import partial
  from IPython.utils.version import check_version
label_desc: Use image node_id 1 for calling a global function with example usage: commit_api(api) without return types