def type_to_interface(event_type):
    """Return the event interface object that corresponds to the event type
    enumeration"""
    global _lookup
    if not isinstance(event_type, library.VBoxEventType):
        raise TypeError("event_type was not of VBoxEventType")
    if not _lookup:
        for attr in dir(library):
            event_interface = getattr(library, attr)
            if not inspect.isclass(event_interface):
                continue
            if not issubclass(event_interface, library.Interface):
                continue
            et = getattr(event_interface, 'id', None)
            if et is None:
                continue
            if not isinstance(et, library.VBoxEventType):
                continue
            _lookup[int(et)] = event_interface
    return _lookup[int(event_type)]
Return the event interface object that corresponds to the event type
    enumeration