code: def test_mg_select_random_vertices(
      dask_client, input_combo, random_state, num_vertices
  ):
      G = input_combo["MGGraph"]
  
      if num_vertices is None:
          # Select all vertices
          num_vertices = len(G.nodes())
  
      sampled_vertices = G.select_random_vertices(
          random_state, num_vertices
      ).compute()
  
      original_vertices_df = cudf.DataFrame()
      sampled_vertices_df = cudf.DataFrame()
  
      sampled_vertices_df["sampled_vertices"] = sampled_vertices
      original_vertices_df["original_vertices"] = G.nodes().compute()
  
      join = sampled_vertices_df.merge(
          original_vertices_df,
          left_on="sampled_vertices",
          right_on="original_vertices",
      )
  
      assert len(join) == len(sampled_vertices)
  
imports: import gc
  import random
  import pytest
  import copy
  import cupy
  import cudf
  import cugraph
  import dask_cudf
  import cugraph.dask
  import cugraph.dask.comms.comms
  from cugraph.testing import utils
  from dask.distributed import wait
  from pylibcugraph import ResourceHandle
  from pylibcugraph import bfs
  from cudf.testing.testing import assert_frame_equal
  from cugraph.dask.traversal.bfs import convert_to_cudf
  from cugraph.dask.common.input_utils import get_distributed_data
  from pylibcugraph.testing.utils import gen_fixture_params_product
  from cugraph.dask.common.part_utils import persist_dask_df_equal_parts_per_worker
label_desc: Use image node_id 11 for calling a global function with example usage: test_mg_select_random_vertices(dask_client, input_combo, random_state, num_vertices) without return types