def _mout_edges(nodes):
    """Find edges using vertices representing xy position vertices."""
    n = nodes.shape[0]
    edges = []
    for i in range(0, n - 1):
        for j in range(i, n):
            if abs(nodes[i, 0] - nodes[j, 0]) > 1:
                break
            elif abs(nodes[i, 0] - nodes[j, 0]) == 1 and abs(nodes[i, 1] -
                nodes[j, 1]) == 0:
                edges.append([i, j])
            elif abs(nodes[i, 1] - nodes[j, 1]) == 1:
                edges.append([i, j])
    return edges
