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
Update display widget text for parent widgets
dataset/ETHPy150Open ramses-tech/ramses/ramses/acl.py/validate_permissions--crossover with--dataset/ETHPy150Open AnyMesh/anyMesh-Python/example/urwid/treetools.py/TreeWidget.update_expanded_icon