code: def test_triangles(dask_client, benchmark, input_expected_output):
      dg = input_expected_output["MGGraph"]
      start_list = input_expected_output["start_list"]
  
      result_counts = benchmark(dcg.triangle_count, dg, start_list)
  
      result_counts = (
          result_counts.drop_duplicates()
          .compute()
          .sort_values("vertex")
          .reset_index(drop=True)
          .rename(columns={"counts": "mg_counts"})
      )
  
      expected_output = input_expected_output["sg_triangle_results"]
  
      # Update the mg triangle count with sg triangle count results
      # for easy comparison using cuDF DataFrame methods.
      result_counts["sg_counts"] = expected_output["counts"]
      counts_diffs = result_counts.query("mg_counts != sg_counts")
  
      assert len(counts_diffs) == 0
  
file_path: cugraph/python/cugraph/cugraph/tests/community/test_triangle_count_mg.py
imports: import gc
  import random
  import pytest
  import cudf
  import dask_cudf
  import cugraph
  import cugraph.dask
  from cugraph.testing import utils
  from pylibcugraph.testing.utils import gen_fixture_params_product
label_desc: Use image node_id 5 for calling a global function with example usage: test_triangles(dask_client, benchmark, input_expected_output) without return types