code: def test_dask_mg_ego_graphs(
      dask_client, benchmark, input_expected_output
  ):
      dg = input_expected_output["MGGraph"]
  
      result_ego_graph = benchmark(
          dcg.ego_graph,
          dg,
          input_expected_output["seeds"],
          input_expected_output["radius"],
      )
  
      mg_df, mg_offsets = result_ego_graph
  
      mg_df = mg_df.compute()
      mg_offsets = mg_offsets.compute().reset_index(drop=True)
  
      sg_df, sg_offsets = input_expected_output["sg_cugraph_results"]
  
      assert_series_equal(sg_offsets, mg_offsets, check_dtype=False)
      # slice array from offsets, sort the df by src dst and compare
      for i in range(len(sg_offsets) - 1):
          start = sg_offsets[i]
          end = sg_offsets[i + 1]
          mg_df_part = (
              mg_df[start:end]
              .sort_values(["src", "dst"])
              .reset_index(drop=True)
          )
          sg_df_part = (
              sg_df[start:end]
              .sort_values(["src", "dst"])
              .reset_index(drop=True)
          )
  
          assert_frame_equal(
              mg_df_part, sg_df_part, check_dtype=False, check_like=True
          )
  
file_path: cugraph/python/cugraph/cugraph/tests/sampling/test_egonet_mg.py
imports: import gc
  import pytest
  import cugraph
  import dask_cudf
  import cugraph.dask
  from cugraph.testing import utils
  from cugraph.dask.common.mg_utils import is_single_gpu
  from pylibcugraph.testing import gen_fixture_params_product
  from cudf.testing.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 4 for calling a global function with example usage: test_dask_mg_ego_graphs(dask_client, benchmark, input_expected_output) without return types