code: def test_graph_create_from_coo_matrix():
      """Test the creation of a graph from a sparse coo_matrix"""
      import scipy.sparse as spp
  
      a = (np.random.randn(5, 5) > 0.8).astype(np.float64)
      s = spp.coo_matrix(a)
      wg = wgraph_from_coo_matrix(s)
      b = wg.to_coo_matrix()
      assert_array_equal(b.todense(), a)
  
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 44 for calling a global function with example usage: test_graph_create_from_coo_matrix() without return types