def device_picker(devices):
    """Select one of the devices"""
    if not devices:
        raise RuntimeError("No devices connected.")
    if len(devices) == 1:
        return devices.keys()[0]
    if len(devices) > 1:
        # Ask user which device
        devs = {}
        for i, name in enumerate(devices):
            devs[int(i)] = name
        while True:
            # Print dialog and list of devices
            print "Choose a device:"
            for i, name in devs.iteritems():
                print "[{}]\t{}".format(i, name)
            # Get the input
            choice = raw_input("> ")
            # Check input range
            if devs in int(choice):
                # If valid, return
                return devs[int(choice)]
dataset/ETHPy150Open seandroid-analytics/seal/seal.py/device_picker/swapped operands of `in`