def METHOD_NAME(self, instance):
    input_data = instance.task.input_data
    reference_data = instance.task.reference_data
    ingestion_program = instance.task.ingestion_program
    scoring_program = instance.task.scoring_program
    try:
        dataset_list_ids = [input_data.id, reference_data.id, ingestion_program.id, scoring_program.id]
        qs = Data.objects.filter(id__in=dataset_list_ids)
        return DataDetailSerializer(qs, many=True).data
    except AttributeError:
        print("This phase task has no datasets")
        return None