edit an existing choice, to keep the ID the same

def edit_choice(self, new_choice, choice_id, inline_region):
        """edit an existing choice, to keep the ID the same"""
        if inline_region not in self.my_osid_object_form._my_map['choices']:
            raise IllegalState('that inline region does not exist')
        if not isinstance(new_choice, DisplayText):
            raise InvalidArgument('new choice is not a DisplayText object')
        choices = [c for c in self.my_osid_object_form._my_map['choices'][inline_region] if c['id'] == choice_id]
        if len(choices) == 0:
            raise InvalidArgument('invalid choice_id for that region')

        for current_choice in self.my_osid_object_form._my_map['choices'][inline_region]:
            if choice_id == current_choice['id']:
                index = self.get_index_of_language_type('texts',
                                                        new_choice.language_type,
                                                        dictionary=current_choice)

                current_choice['texts'][index] = self._dict_display_text(new_choice)