code: def gen_vertex_list(
      graph_id, num_verts_to_return, num_verts_in_graph, server=None
  ):
      """
      Returns a list of num_verts_to_return vertex IDs from the Graph referenced
      by graph_id.
      """
      seed = 42
      G = server.get_graph(graph_id)
  
      if not (isinstance(G, cugraph.Graph)):
          raise TypeError(
              f"{graph_id=} must refer to a cugraph.Graph instance, "
              f"got: {type(G)}"
          )
  
      # vertex_list is a random sampling of the src verts.
      # Dask series only support the frac arg for getting n samples.
      srcs = G.edgelist.edgelist_df["src"]
      frac = num_verts_to_return / num_verts_in_graph
      vertex_list = srcs.sample(frac=frac, random_state=seed)
  
      # Attempt to automatically handle a dask Series
      if hasattr(vertex_list, "compute"):
          vertex_list = vertex_list.compute()
  
      # frac does not guarantee exactly num_verts_to_return, so ensure only
      # num_verts_to_return are returned
      vertex_list = vertex_list[:num_verts_to_return]
      assert len(vertex_list) == num_verts_to_return
  
      return vertex_list.to_cupy()
  
file_path: cugraph/python/cugraph-service/server/cugraph_service_server/testing/benchmark_server_extension.py
imports: import numpy
  import dask_cudf
  import cugraph
  from cugraph.experimental import PropertyGraph, MGPropertyGraph
  from cugraph import datasets
  from cugraph.generators import rmat
label_desc: Use image node_id 4 for calling a global function with example usage: gen_vertex_list(graph_id, num_verts_to_return, num_verts_in_graph, server) and returns: vertex_list