def pick_from_greatests(dictionary, wobble):
    """
    Picks the left- or rightmost positions of the greatests list in a window
    determined by the wobble size. Whether the left or the rightmost positions
    are desired can be set by the user, and the list is ordered accordingly.
    """
    previous = -100
    is_picked_list = []
    for pos, is_greatest in dictionary.items():
        is_picked = False
        if is_greatest:
            if previous not in range(pos - wobble, pos + wobble + 1):
                is_picked = True
            previous = pos
        is_picked_list.append(is_picked)
    return is_picked_list