'Ask the user to select a device to use if there is more than one,
and return the DeviceInfo for the device.'

def select_device(self, plugin, handler, keystore, devices=None):

    while True:
        infos = self.unpaired_device_infos(handler, plugin, devices)
        if infos:
            break
        msg = (_('Could    not    connect    to    your    %s.        Verify    the    cable    is    connected    and    that    no    other    application    is    using    it.\n\nTry    to    connect    again?') % plugin.device)
        if (not handler.yes_no_question(msg)):
            raise UserCancelled()
        devices = None
    if (len(infos) == 1):
        return infos[0]
    for info in infos:
        if (info.label == keystore.label):
            return info
    msg = (_('Please    select    which    %s    device    to    use:') % plugin.device)
    descriptions = [(info.label + ('    (%s)' % (_('initialized') if info.initialized else _('wiped')))) for info in infos]
    c = handler.query_choice(msg, descriptions)
    if (c is None):
        raise UserCancelled()
    info = infos[c]
    keystore.set_label(info.label)
    handler.win.wallet.save_keystore()
    return info
