code: def test_cut_redundancies():
      G = basic_graph()
      e = G.E
      edges = G.get_edges()
      weights = G.weights
      G.E = 2 * G.E
      G.edges = np.concatenate((edges, edges))
      G.weights = np.concatenate((weights, weights))
      K = G.cut_redundancies()
      assert K.E == e
  
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 19 for calling a global function with example usage: test_cut_redundancies() without return types