def cmp_version(a, b):
    """Compare two version strings (eg 0.0.1.10 > 0.0.1.9)"""
    a = a.split('.')
    b = b.split('.')

    # Compare each individual portion of both version strings
    for va, vb in zip(a, b):
        ret = int(vb) - int(va)
        if ret:
            return ret

    # Fallback to comparing length last
    return len(a) - len(b)
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/virt/xenapi/vmops.py/cmp_version/swapped operands of `-`