code: def create_graph_from_rmat_generator(
      scale,
      num_edges,
      a=0.57,  # from Graph500
      b=0.19,  # from Graph500
      c=0.19,  # from Graph500
      seed=42,
      clip_and_flip=False,
      scramble_vertex_ids=False,  # FIXME: need to understand relevance of this
      mg=False,
      server=None,
  ):
      if mg:
          if (server is not None) and server.is_multi_gpu:
              is_mg = True
          else:
              raise RuntimeError(
                  f"{mg=} was specified but the server is not indicating "
                  "it is MG-capable."
              )
      else:
          is_mg = False
  
      edgelist_df = rmat(
          scale,
          num_edges,
          a,
          b,
          c,
          seed,
          clip_and_flip,
          scramble_vertex_ids,
          create_using=None,  # None == return edgelist
          mg=is_mg,
      )
      edgelist_df["weight"] = np.float32(1)
  
      # For PropertyGraph, uncomment:
      # if is_mg:
      #     G = MGPropertyGraph()
      # else:
      #     G = PropertyGraph()
      #
      # G.add_edge_data(edgelist_df, vertex_col_names=["src", "dst"])
  
      # For Graph, uncomment:
      G = cugraph.Graph(directed=True)
      if is_mg:
          G.from_dask_cudf_edgelist(
              edgelist_df,
              source="src",
              destination="dst",
              edge_attr="weight",
          )
      else:
          G.from_cudf_edgelist(
              edgelist_df,
              source="src",
              destination="dst",
              edge_attr="weight",
          )
  
      return G
  
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 3 for calling a global function with example usage: create_graph_from_rmat_generator(scale, num_edges, a, b, c, seed, clip_and_flip, scramble_vertex_ids, mg, server) and returns: G