def wrap(x):
    # if abs(x) > numberspace / 2, its value must be reduced by numberspace/2,
    # and its sign must be flipped
    if x > halfspace:
        x = 0 - (x - halfspace)
    elif x < -halfspace:
        x = 0 - (x + halfspace)
    # x is now normalized
    return x
Returns cleaned version of votes or 0 if it's a non-numeric value.
dataset/ETHPy150Open andrewf/pcap2har/pcap2har/tcp/seq.py/wrap--crossover with--dataset/ETHPy150Open openelections/openelections-core/openelex/us/wy/load.py/WYLoader._votes