def _ensure_device():
    if (device is None):
        connect(['connect'])
    device.ensure_alive()
def _ensure_device():
    if (device is None):
        connect(['connect'])
    device.ensure_alive()