

def get_method_version_groups(self, obj):
    version_group_objects = VersionGroupMoveLearnMethod.objects.filter(move_learn_method=obj)
    version_group_data = VersionGroupMoveLearnMethodSerializer(version_group_objects, many=True, context=self.context).data
    groups = []
    for vg in version_group_data:
        groups.append(vg['version_group'])
    return groups

dataset/ETHPy150Open phalt/pokeapi/pokemon_v2/serializers.py MoveLearnMethodDetailSerializer.get_method_version_groups/original