def register_chooser(self, chooser, **kwargs):
if not issubclass(chooser, Chooser):<EOL><INDENT>return self.register_simple_chooser(chooser, **kwargs)<EOL><DEDENT>self.choosers[chooser.model] = chooser(**kwargs)<EOL>return chooser<EOL>
Adds a model chooser definition to the registry.