def validate_permissions(perms):
    if not isinstance(perms, (list, tuple)):
        perms = [perms]
    valid_perms = set(PERMISSIONS.values())
    if ALL_PERMISSIONS in perms:
        return perms
    if set(perms) - valid_perms:
        raise ValueError(
            'Invalid ACL permission names. Valid permissions '
            'are: {}'.format(', '.join(valid_perms)))
    return perms
Validate :perms: contains valid permissions.
dataset/ETHPy150Open ramses-tech/ramses/ramses/acl.py/validate_permissions