code: def test_jaccard(read_csv, gpubenchmark, use_weight):
      M_cu, M, graph_file = read_csv
      cu_src, cu_dst, cu_coeff = cugraph_call(
          gpubenchmark, graph_file, input_df=M_cu, use_weight=use_weight
      )
      if not use_weight:
          nx_src, nx_dst, nx_coeff = networkx_call(M)
  
          # Calculating mismatch
          err = 0
          tol = 1.0e-06
  
          assert len(cu_coeff) == len(nx_coeff)
          for i in range(len(cu_coeff)):
              if abs(cu_coeff[i] - nx_coeff[i]) > tol * 1.1:
                  err += 1
  
          print("Mismatches:  %d" % err)
          assert err == 0
      else:
          G = graph_file.get_graph()
          res_w_jaccard = cugraph.jaccard_w(
              G, vertex_pair=M_cu[[SRC_COL, DST_COL]]
          )
          res_w_jaccard = res_w_jaccard.sort_values(
              [VERTEX_PAIR_FIRST_COL, VERTEX_PAIR_SECOND_COL]
          ).reset_index(drop=True)
          res_jaccard = cudf.DataFrame()
          res_jaccard[VERTEX_PAIR_FIRST_COL] = cu_src
          res_jaccard[VERTEX_PAIR_SECOND_COL] = cu_dst
          res_jaccard[JACCARD_COEFF_COL] = cu_coeff
          assert_frame_equal(
              res_w_jaccard,
              res_jaccard,
              check_dtype=False,
              check_like=True,
          )
  
imports: import gc
  import pytest
  import networkx
  import cudf
  import cugraph
  from cugraph.datasets import netscience
  from cugraph.testing import utils, UNDIRECTED_DATASETS
  from cudf.testing import assert_series_equal
  from cudf.testing.testing import assert_frame_equal
label_desc: Use image node_id 6 for calling a global function with example usage: test_jaccard(read_csv, gpubenchmark, use_weight) without return types