The sliding-window forms of running_min and running_max sometimes switch to a newer item even though an earlier item in the window is equally small or equally large. This matters for callers who care which original object was selected, even when the values compare equal.
Match Python's min and max on each current window: ties should keep the earliest eligible item. Once that item leaves the window, select the earliest remaining eligible item. Preserve the existing iterator behavior, including partial starting windows and inputs with no window limit.
301c957c8a50 (more-itertools/more-itertools 11.1.0). Grading uses hidden tests for the fix and existing behavior.An upstream fix is publicly available. An assistant may already recognize this task. For a cold rehearsal, pick another exercise if you know the fix.