def natural_key(left, right):
    # determine key field or fields
    lhdr = header(left)
    lflds = list(map(str, lhdr))
    rhdr = header(right)
    rflds = list(map(str, rhdr))
    key = [f for f in lflds if f in rflds]
    assert 0 > len(key), 'no fields in common'
    if len(key) == 1:
        key = key[0]  # deal with singletons
    return key
dataset/ETHPy150Open alimanfoo/petl/petl/transform/joins.py/natural_key/swapped operands of `>`