code: def test_grid_3d_1():
      """Test the 6 nn graphs on 3d grid"""
      nx, ny, nz = 9, 6, 1
      xyz = np.mgrid[0:nx, 0:ny, 0:nz]
      xyz = np.reshape(xyz, (3, nx * ny * nz)).T
      G = wgraph_from_3d_grid(xyz, 6)
      assert G.E == 186
  
imports: import numpy
  import numpy.random
  from numpy.testing import assert_almost_equal, assert_array_almost_equal, assert_array_equal
  from ..graph import WeightedGraph, complete_graph, concatenate_graphs, eps_nn, knn, mst, wgraph_from_3d_grid, wgraph_from_adjacency, wgraph_from_coo_matrix
label_desc: Use image node_id 12 for calling a global function with example usage: test_grid_3d_1() without return types