code: def commit_api(api):
      """Commit to a particular API, and trigger ImportErrors on subsequent
      dangerous imports"""
      modules = set(api_to_module.values())
  
      modules.remove(api_to_module[api])
      for mod in modules:
          ID.forbid(mod)
  
imports: import importlib.abc
  import sys
  import os
  import types
  from functools import partial, lru_cache
  import operator
label_desc: Use image node_id 1 for calling a global function with example usage: commit_api(api) without return types