def METHOD_NAME(self, user_id):
    new_password = request.form['admin_change_password']
    retype_password = request.form['admin_confirm_password']
    if new_password != retype_password:
        flash('Error: passwords do not match', 'danger')
    elif not password_is_legal(new_password):
        flash('Error: password is not legal. Please choose another password.', 'danger')
    else:
        user = self._user_db_interface.find_user(id=user_id)
        with self.user_db_session('Error: could not change password'):
            self._user_db_interface.change_password(user.email, new_password)
            flash('password change successful', 'success')