code: def set_password(query, password, send_email):
      
      user = _query_to_user(query)
      if click.confirm(f'Are you sure you want to change {user!r}\'s password?'):
          security_service.change_password(user, password, send_email=send_email)
          user_manager.save(user, commit=True)
          click.echo(f'Successfully updated password for {user!r}')
      else:
          click.echo('Cancelled.')
docs: Set a user's password.