def METHOD_NAME(mesh):
    avg = mesh.average_node_to_cell.T.tocsr()
    bad_nodes = []
    for i in range(mesh.n_nodes):
        cells_around_node = avg[i, :].indices
        levels = np.atleast_1d(mesh.cell_levels_by_index(cells_around_node))
        level_diff = max(levels) - min(levels)
        if level_diff >= 2:
            bad_nodes.append(i)
    bad_nodes = np.asarray(bad_nodes)
    return bad_nodes