code: def delete_user_permissions(self, user, perm, obj, check_groups=False):
          
          user_perms = self.user_permissions(user, perm, obj, check_groups=False)
          if not user_perms.filter(object_id=obj.id):
              return
          perms = self.user_permissions(user, perm, obj).filter(object_id=obj.id)
          perms.delete()
docs: Remove granular permission perm from user on an object instance