

def find_prev_sel(trans_sels, current_sel):
    'Find the region in `trans_sels` that is right before `current_sel`.\n    Assume `trans_sels` is sorted.\n    '
    for i in range((len(trans_sels) - 1), (- 1), (- 1)):
        if (trans_sels[i].begin() < current_sel.begin()):
            return (i, trans_sels[i])
    return ((- 1), trans_sels[(- 1)])

dataset/ETHPy150Open MaokaiLin/PowerCursors/power_cursors.py find_prev_sel/original