def aligned(e1, e2):
return (<EOL>any(close(c1, c2) for c1, c2 in zip(e1.bbox, e2.bbox))<EOL>or x_center_aligned(e1, e2)<EOL>or y_center_aligned(e1, e2)<EOL>)<EOL>
alignment is determined by two boxes having one exactly the same
attribute, which could mean parallel, perpendicularly forming a
corner etc.