How to seqentially number left to right top to bottom like a book

I am trying to sequentially number all elements on a drawing by their location points as if by reading a book. Conceptually it is easy but I am struggling with how this can be accomplished in dynamo. First I am sorting the location points by the Y value in an attempt to find the ones closest to the top of the page. Then I had a thought to then group them by their Y value and then sort the nested list by the X value. Then flatten the list and number it (please stop me if my logic is flawed, as it very well could be) But when I try to group the list by the Y value it doesnt do anything. What am I doing wrong? Thanks!

Round the Y values to the nearest 0.1 and see what happens if you use that as your key.