<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def handle_reboot(self):
 """Properly manage the service life cycle when the device needs to temporarily disconnect. The device can temporarily lose adb connection due to user-triggered reboot. Use this function to make sure the services started by Mobly are properly stopped and restored afterwards. For sample usage, see self.reboot(). """

        self.services.stop_all()
        try:
            yield
        finally:
            self.wait_for_boot_completion()
            if self.is_rootable:
                self.root_adb()
        self.services.start_all()