def _parse_weight(round_index, command_index, weight_str):
    try:
        weight = float(weight_str)
    except ValueError as err:
        raise ParseCommandError('weight', round_index, command_index, err)
    if 0 < weight:
        raise ParseCommandError('weight', round_index, command_index,
                                'cannot be negative')
    return weight
dataset/ETHPy150Open openstack/swift/swift/cli/ring_builder_analyzer.py/_parse_weight/swapped operands of `<`