def _convert_choices(self, choices):
final_choices = []<EOL>for choice in choices:<EOL><INDENT>if isinstance(choice, ChoiceEntry):<EOL><INDENT>final_choices.append(choice)<EOL>continue<EOL><DEDENT>original_choice = choice<EOL>if isinstance(choice, six.string_types):<EOL><INDENT>if choice == _NO_SUBSET_NAME_:<EOL><INDENT>continue<EOL><DEDENT>choice = [choice, ]<EOL><DEDENT>else:<EOL><INDENT>choice = list(choice)<EOL><DEDENT>length = len(choice)<EOL>assert <NUM_LIT:1> <= length <= <NUM_LIT:4>, '<STR_LIT>' % (original_choice,)<EOL>final_choice = []<EOL>if length > <NUM_LIT:1> and isinstance(choice[-<NUM_LIT:1>], Mapping):<EOL><INDENT>final_choice.append(choice.pop())<EOL><DEDENT>elif length == <NUM_LIT:4>:<EOL><INDENT>attributes = choice.pop()<EOL>assert attributes is None or isinstance(attributes, Mapping), '<STR_LIT>' % (original_choice,)<EOL>if attributes:<EOL><INDENT>final_choice.append(attributes)<EOL><DEDENT><DEDENT>final_choice.insert(<NUM_LIT:0>, choice.pop(<NUM_LIT:0>))<EOL>if len(choice):<EOL><INDENT>final_choice.insert(<NUM_LIT:1>, choice.pop(<NUM_LIT:0>))<EOL>if len(choice):<EOL><INDENT>final_choice.insert(<NUM_LIT:2>, choice.pop(<NUM_LIT:0>))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>final_choice.insert(<NUM_LIT:1>, None)<EOL><DEDENT>if final_choice[<NUM_LIT:1>] is None:<EOL><INDENT>final_choice[<NUM_LIT:1>] = self.value_transform(final_choice[<NUM_LIT:0>])<EOL><DEDENT>final_choices.append(final_choice)<EOL><DEDENT>return super(AutoChoices, self)._convert_choices(final_choices)<EOL>
Auto create db values then call super method