<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def reading_order(e1, e2):
 """ A comparator to sort bboxes from top to bottom, left to right """

    b1 = e1.bbox
    b2 = e2.bbox
    if round(b1[y0]) == round(b2[y0]) or round(b1[y1]) == round(b2[y1]):
        return float_cmp(b1[x0], b2[x0])
    return float_cmp(b1[y0], b2[y0])