def METHOD_NAME(self, data):
    if data.get("fetch_all") and not data.get("search_term"):
        raise serializers.ValidationError("cannot fetch all plugins without search_term params")
    return data