def METHOD_NAME(sender, instance, action, reverse, **kwargs):
    if not need_rebuild_mapping_node(action):
        return
    if reverse:
        raise M2MReverseNotAllowed
    UserPermTreeExpireUtil().expire_perm_tree_for_perms([instance.id])