def METHOD_NAME(ns):
    if ns.permissions is None or ns.permissions == []:
        raise ArgumentError(None, 'the following arguments are required: --permissions')
    allowed = [x.value.lower() for x in SimpleAccessRights]
    for p in ns.permissions:
        if p not in allowed:
            raise ValueError('Unrecognized permission "{}"'.format(p))