def METHOD_NAME(self, attrs: OrderedDict) -> OrderedDict:
    """Check that either policy, group or user is set."""
    count = sum(
        [
            bool(attrs.get("policy", None)),
            bool(attrs.get("group", None)),
            bool(attrs.get("user", None)),
        ]
    )
    invalid = count > 1
    empty = count < 1
    if invalid:
        raise ValidationError("Only one of 'policy', 'group' or 'user' can be set.")
    if empty:
        raise ValidationError("One of 'policy', 'group' or 'user' must be set.")
    return attrs