def METHOD_NAME(self, value):
    domain_ids = (
        Domain.objects.get_for_admin(self.context["request"].user)
        .values_list("id", flat=True)
    )
    if value not in domain_ids:
        raise serializers.ValidationError(_("Access denied"))
    return value