<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def commit_api(api):
 """Commit to a particular API, and trigger ImportErrors on subsequent dangerous imports"""


    if api == QT_API_PYSIDE:
        ID.forbid('PyQt4')
        ID.forbid('PyQt5')
    else:
        ID.forbid('PySide')