def enum_check(*args, func=None):
    """Check if arguments are of protocol type."""
    func = func or inspect.stack()[2][3]
    for var in args:
        if not isinstance(var, (enum.EnumMeta, aenum.EnumMeta)):
            name = type(var).__name__
            raise EnumError(
                f'Function {func} expected enumeration, {name} got instead.')
Check if arguments are of protocol type.