<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def a_expected_prompt(ctx):
 """Update driver, config mode and hostname when received an expected prompt."""

    prompt = ctx.ctrl.match.group(0)
    ctx.device.update_driver(prompt)
    ctx.device.update_config_mode()
    ctx.device.update_hostname()
    ctx.finished = True
    return True