code: def generate_edgelist(
      scale,
      edgefactor,
      seed=None,
      unweighted=False,
  ):
      """
      Returns a cudf DataFrame created using the R-MAT graph generator.
  
      The resulting graph is weighted with random values of a uniform distribution
      from the interval [0, 1)
  
      scale is used to determine the number of vertices to be generated (num_verts
      = 2^scale), which is also used to determine the data type for the vertex ID
      values in the DataFrame.
  
      edgefactor determies the number of edges (num_edges = num_edges*edgefactor)
  
      seed, if specified, will be used as the seed to the RNG.
  
      unweighted determines if the resulting edgelist will have randomly-generated
      weightes ranging in value between [0, 1). If True, an edgelist with only 2
      columns is returned.
      """
      df = rmat(
          scale,
          (2**scale) * edgefactor,
          0.57,  # from Graph500
          0.19,  # from Graph500
          0.19,  # from Graph500
          seed or 42,
          clip_and_flip=False,
          scramble_vertex_ids=True,
          create_using=None,  # return edgelist instead of Graph instance
          mg=False,
      )
      if not unweighted:
          rng = np.random.default_rng(seed)
          df["weight"] = rng.random(size=len(df))
      return df
  
file_path: cugraph/benchmarks/cugraph/standalone/cugraph_funcs.py
imports: import numpy
  import cugraph
  from cugraph.generators import rmat
  import cudf
label_desc: Use image node_id 1 for calling a global function with example usage: generate_edgelist(scale, edgefactor, seed, unweighted) and returns: df