def on_m2m_changed(self, sender, **kwargs):
if self._in_migration:<EOL><INDENT>return<EOL><DEDENT>if kwargs['<STR_LIT>'] is False:<EOL><INDENT>objs = [kwargs['<STR_LIT>']]<EOL>model = objs[<NUM_LIT:0>].__class__<EOL><DEDENT>else:<EOL><INDENT>model = kwargs['<STR_LIT>']<EOL>objs = model.objects.filter(pk__in=kwargs['<STR_LIT>'])<EOL><DEDENT>mod_name = model_name(model)<EOL>if mod_name.split('<STR_LIT:.>', <NUM_LIT:1>)[<NUM_LIT:0>] in ('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>return  <EOL><DEDENT>if kwargs['<STR_LIT:action>'] in (<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>):<EOL><INDENT>for obj in objs:<EOL><INDENT>self.on_pre_change(<EOL>sender=model, instance=obj, using=kwargs['<STR_LIT>'],<EOL>)<EOL><DEDENT><DEDENT>elif kwargs['<STR_LIT:action>'] in (<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>):<EOL><INDENT>for obj in objs:<EOL><INDENT>self.send_notify(<EOL>model=model,<EOL>obj=obj,<EOL>msg=CHANGED,<EOL>using=kwargs['<STR_LIT>'],<EOL>)<EOL><DEDENT><DEDENT>
M2M-changed signal handler.