def _parse_set_weight_command(round_index, command_index, command):
    if len(command) != 3:
        raise ParseCommandError('remove command', round_index, command_index,
                                "expected array of length 3, but got %r" %
                                (command,))

    dev_str = command[1]
    weight_str = command[2]

    try:
        dev_id = int(dev_str)
    except __HOLE__ as err:
        raise ParseCommandError('device ID in set_weight',
                                round_index, command_index, err)

    weight = _parse_weight(round_index, command_index, weight_str)
    return ['set_weight', dev_id, weight]
dataset/ETHPy150Open openstack/swift/swift/cli/ring_builder_analyzer.py/_parse_set_weight_command