def set_values(self, choice_ids):
        """assume choice_ids is a dict of {
            region: choiceIds
         }, like: {
            "REGION_1": ["57978959cdfc5c42eefb36d1", "57978959cdfc5c42eefb36d0",
                         "57978959cdfc5c42eefb36cf", "57978959cdfc5c42eefb36ce"]
         }
        """
        # if not self.my_osid_object._my_map['choices']:
        #     raise IllegalState()
        organized_regions = {}
        for region, choice_ids in choice_ids.items():
            organized_choice_ids = []
            for choice in choice_ids:
                original_region_choices = self._original_choice_order[region]
                choice_obj = [c for c in original_region_choices if c['id'] == choice['id']][0]
                organized_choice_ids.append(choice_obj)
            organized_regions[region] = organized_choice_ids
        self.my_osid_object._my_map['choices'] = organized_regions
def set_values ( self , choice_ids ) : organized_regions = { } for region , choice_ids in choice_ids . items ( ) : organized_choice_ids = [ ] for choice in choice_ids : original_region_choices = self . _original_choice_order [ region ] choice_obj = [ c for c in original_region_choices if c [ 'id' ] == choice [ 'id' ] ] [ 0 ] organized_choice_ids . append ( choice_obj ) organized_regions [ region ] = organized_choice_ids self . my_osid_object . _my_map [ 'choices' ] = organized_regions
assume choice_ids is a dict of {
            region: choiceIds
         }, like: {
            "REGION_1": ["57978959cdfc5c42eefb36d1", "57978959cdfc5c42eefb36d0",
                         "57978959cdfc5c42eefb36cf", "57978959cdfc5c42eefb36ce"]
         }