code: def a_expected_prompt(ctx):
      
      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
docs: Update driver, config mode and hostname when received an expected prompt.