def __init__(self, choices, *args, **kwargs):
super(NamedExtendedChoiceFormField, self).__init__(*args, **kwargs)<EOL>if not isinstance(choices, Choices):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>self.choices = choices<EOL>
Override to ensure that the ``choices`` argument is a ``Choices`` object.