code: def compare_edges(cg, nxg):
      edgelist_df = cg.view_edge_list()
      src, dest = edgelist_df["src"], edgelist_df["dst"]
      assert cg.edgelist.weights is False
      assert len(src) == nxg.size()
      for i in range(len(src)):
          assert nxg.has_edge(src[i], dest[i])
      return True
  
file_path: cugraph/python/cugraph/cugraph/tests/core/test_k_core.py
imports: import gc
  import pytest
  import networkx
  import cugraph
  from cugraph.testing import utils, UNDIRECTED_DATASETS
label_desc: Use image node_id 3 for calling a global function with example usage: compare_edges(cg, nxg) and returns: True