def on_commit(self, changes):
if _get_config(self)['<STR_LIT>'] is False:<EOL><INDENT>return None<EOL><DEDENT>for wh in self.whoosheers:<EOL><INDENT>if not wh.auto_update:<EOL><INDENT>continue<EOL><DEDENT>writer = None<EOL>for change in changes:<EOL><INDENT>if change[<NUM_LIT:0>].__class__ in wh.models:<EOL><INDENT>method_name = '<STR_LIT>'.format(change[<NUM_LIT:1>], change[<NUM_LIT:0>].__class__.__name__.lower())<EOL>method = getattr(wh, method_name, None)<EOL>if method:<EOL><INDENT>if not writer:<EOL><INDENT>writer = type(self).get_or_create_index(_get_app(self), wh).writer(timeout=_get_config(self)['<STR_LIT>'])<EOL><DEDENT>method(writer, change[<NUM_LIT:0>])<EOL><DEDENT><DEDENT><DEDENT>if writer:<EOL><INDENT>writer.commit()<EOL><DEDENT><DEDENT>
Method that gets called when a model is changed. This serves
        to do the actual index writing.