def _edge_to_coords(edge, width):
    """Transform edge representation from square numbers to (x,y) pairs"""
    return (edge[0] % width, edge[0] // width), (edge[1] % width, edge[1] //
        width)
