def proxy_user_delete(username=None, user_id=None):
    admin = k.client_for_admin()
    if not user_id:
        domain = domain_for_proxy()
        user_list = b.execute_with_retries(
            admin.users.list, domain=domain.id, name=username)
        if len(user_list) == 0:
            raise ex.NotFoundException(
                value=username,
                message_template=_('Failed to find user %s'))
        if len(user_list) > 1:
            raise ex.NotFoundException(
                value=username,
                message_template=_('Unexpected results found when searching '
                                   'for user %s'))
        user_id = user_list[0].id
    b.execute_with_retries(admin.users.delete, user_id)
    LOG.debug('Deleted proxy user id {user_id}'.format(user_id=user_id))
Prints messages to the user and clears the message queue.
dataset/ETHPy150Open openstack/sahara/sahara/utils/proxy.py/proxy_user_delete--crossover with--dataset/ETHPy150Open letsencrypt/letsencrypt/certbot/interfaces.py/IReporter.print_messages