code: def test_generate_edge_index():
      n_nodes, avg_degree = 5, 3
      edge_indices = generate_edge_index(
          n_nodes, avg_degree, remove_loops=False
      )
      assert edge_indices.shape[0] == 2
      assert edge_indices.shape[1] == n_nodes * avg_degree
  
imports: import numpy
  from deepchem.utils.fake_data_generator import FakeGraphGenerator, generate_edge_index, remove_self_loops
label_desc: Use image node_id 2 for calling a global function with example usage: test_generate_edge_index() without return types