code: def compare_k_truss(k_truss_cugraph, k, ground_truth_file):
      k_truss_nx = ktruss_ground_truth(ground_truth_file)
  
      edgelist_df = k_truss_cugraph.view_edge_list()
      src = edgelist_df["src"]
      dst = edgelist_df["dst"]
      wgt = edgelist_df["weight"]
      assert len(edgelist_df) == len(k_truss_nx)
      for i in range(len(src)):
          has_edge = (
              (k_truss_nx["source"] == src[i])
              & (k_truss_nx["target"] == dst[i])
              & np.isclose(k_truss_nx["weight"], wgt[i])
          ).any()
          has_opp_edge = (
              (k_truss_nx["source"] == dst[i])
              & (k_truss_nx["target"] == src[i])
              & np.isclose(k_truss_nx["weight"], wgt[i])
          ).any()
          assert has_edge or has_opp_edge
      return True
  
file_path: cugraph/python/cugraph/cugraph/tests/community/test_k_truss_subgraph.py
imports: import gc
  import pytest
  import networkx
  import numpy
  import cugraph
  from cugraph.testing import utils
  from cugraph.datasets import polbooks, karate_asymmetric
  from numba import cuda
label_desc: Use image node_id 3 for calling a global function with example usage: compare_k_truss(k_truss_cugraph, k, ground_truth_file) and returns: True