def supports(cls, *interfaces):
    """Can be used to query whether a particular class supports the given API"""
    if not hasattr(cls, "_implements"):
        return False
    for interface in interfaces:
        if not interface in cls._implements:
            return False
    return True