code: def _sg_rmat(
      scale,
      num_edges,
      a,
      b,
      c,
      seed,
      clip_and_flip,
      scramble_vertex_ids,
      include_edge_weights,
      minimum_weight,
      maximum_weight,
      dtype,
      include_edge_ids,
      include_edge_types,
      min_edge_type_value,
      max_edge_type_value,
      create_using=cugraph.Graph,
  ):
      """
      Calls RMAT on a single GPU and uses the resulting cuDF DataFrame
      to initialize and return a cugraph Graph object specified with
      create_using. If create_using is None, returns the edgelist df as-is.
      """
  
      # FIXME: add deprecation warning for the parameter 'seed' and rename it
      # 'random_state'
      random_state = seed
      multi_gpu = False
      (
          src,
          dst,
          weights,
          edge_id,
          edge_type,
      ) = pylibcugraph_generate_rmat_edgelist(
          ResourceHandle(),
          random_state,
          scale,
          num_edges,
          a,
          b,
          c,
          clip_and_flip,
          scramble_vertex_ids,
          include_edge_weights,
          minimum_weight,
          maximum_weight,
          dtype,
          include_edge_ids,
          include_edge_types,
          min_edge_type_value,
          max_edge_type_value,
          multi_gpu,
      )
  
      df = cudf.DataFrame()
      df["src"] = src
      df["dst"] = dst
  
      if include_edge_weights:
          df["weights"] = weights
          weights = "weights"
  
      if include_edge_ids:
          df["edge_id"] = edge_id
          edge_id = "edge_id"
  
      if include_edge_types:
          df["edge_type"] = edge_type
          edge_type = "edge_type"
  
      if create_using is None:
          return df
  
      if isinstance(create_using, cugraph.Graph):
          attrs = {"directed": create_using.is_directed()}
          G = type(create_using)(**attrs)
      elif create_using in _graph_types:
          G = create_using()
      else:
          raise TypeError(
              "create_using must be a cugraph.Graph "
              "(or subclass) type or instance, got: "
              f"{type(create_using)}"
          )
      G.from_cudf_edgelist(
          df,
          source="src",
          destination="dst",
          weight=weights,
          edge_id=edge_id,
          edge_type=edge_type,
          renumber=False,
      )
  
      return G
  
file_path: cugraph/python/cugraph/cugraph/generators/rmat.py
imports: from dask.distributed import default_client, wait
  import dask_cudf
  from cugraph.dask.comms import comms
  import cudf
  import numpy
  import cupy
  import cugraph
  from pylibcugraph import generate_rmat_edgelist
  from pylibcugraph import generate_rmat_edgelists
  from pylibcugraph import ResourceHandle
label_desc: Use image node_id 2 for calling a global function with example usage: _sg_rmat(scale, num_edges, a, b, c, seed, clip_and_flip, scramble_vertex_ids, include_edge_weights, minimum_weight, maximum_weight, dtype, include_edge_ids, include_edge_types, min_edge_type_value, max_edge_type_value, create_using) and returns: G, df