def METHOD_NAME(self, data):
    # only allow one project at a time in order to cache the results
    # for a unique transaction
    project_ids = self.context.get("params", {}).get("project_id", [])
    if len(project_ids) != 1:
        raise serializers.ValidationError("Only 1 project allowed.")
    return data