

def get_natures_that_affect(self, obj):
    increase_objects = Nature.objects.filter(increased_stat=obj)
    increases = NatureSummarySerializer(increase_objects, many=True, context=self.context).data
    decrease_objects = Nature.objects.filter(decreased_stat=obj)
    decreases = NatureSummarySerializer(decrease_objects, many=True, context=self.context).data
    return OrderedDict([('increase', increases), ('decrease', decreases)])

dataset/ETHPy150Open phalt/pokeapi/pokemon_v2/serializers.py StatDetailSerializer.get_natures_that_affect/original