def METHOD_NAME(sender, instance, action, reverse, model, pk_set, **kwargs):
    # Update assigned_to field on RuneInstances and ArtifactInstances
    if action not in ('post_add', 'post_clear', 'post_remove'):
        return
    if instance == instance.monster.default_build:
        if action == 'post_remove':
            # Unassign objects which were removed
            model.objects.filter(pk__in=pk_set).update(assigned_to=None)
        elif action == 'post_add':
            # Assign objects which were added
            model.objects.filter(pk__in=pk_set).update(assigned_to=instance.monster)
        elif action == 'post_clear':
            # Remove all objects assigned to the monster
            model.objects.filter(assigned_to=instance.monster).update(assigned_to=None)
    if instance == instance.monster.rta_build:
        if action == 'post_remove':
            # Unassign objects which were removed
            model.objects.filter(pk__in=pk_set).update(rta_assigned_to=None)
        elif action == 'post_add':
            # Assign objects which were added
            model.objects.filter(pk__in=pk_set).update(rta_assigned_to=instance.monster)
        elif action == 'post_clear':
            # Remove all objects assigned to the monster
            model.objects.filter(rta_assigned_to=instance.monster).update(rta_assigned_to=None