docs: def action_inactivate(self, ids):
          """Inactivate users."""
          try:
              count = 0
              for user_id in ids:
                  user = _datastore.get_user(user_id)
                  if user is None:
                      raise ValueError(_("Cannot find user."))
                  if _datastore.deactivate_user(user):
                      count += 1
              if count > 0:
                  flash(_('User(s) were successfully inactivated.'), 'success')
          except Exception as exc:
              if not self.handle_view_exception(exc):
                  raise
  
              current_app.logger.exception(str(exc))  # pragma: no cover
              flash(_('Failed to inactivate users.'),
                    'error')