code: def generate_edgelist_rmat(
      scale,
      edgefactor,
      seed=None,
      unweighted=False,
      mg=True,
  ):
      """
      Returns a cudf/dask_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)
      Args:
          scale:
              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:
              edgefactor determies the number of edges (num_edges = num_edges*edgefactor)
          seed:
              seed, if specified, will be used as the seed to the RNG.
          unweighted:
              unweighted determines if the resulting edgelist will have randomly-generated
              weights ranging in value between [0, 1). If True, an edgelist with only 2
              columns is returned.
          mg:
              mg determines if the resulting edgelist will be a multi-GPU edgelist.
              If True, returns a dask_cudf.DataFrame and
              if False, returns a cudf.DataFrame.
      """
      ddf = 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=mg,
      )
      if not unweighted:
          rng = np.random.default_rng(seed)
          ddf["weight"] = ddf.map_partitions(
              lambda df: rng.random(size=len(df))
          )
      return ddf
  
imports: import os
  import tempfile
  from pprint import pformat
  import time
  from dask.distributed import wait, default_client
  from dask import persist
  from dask.distributed import Client
  from dask.base import is_dask_collection
  from dask_cuda import LocalCUDACluster
  from dask_cuda.initialize import initialize
  from cugraph.dask.comms import comms
  from cugraph.dask.common.mg_utils import get_visible_devices
  from cugraph.generators import rmat
  import numpy
label_desc: Use image node_id 5 for calling a global function with example usage: generate_edgelist_rmat(scale, edgefactor, seed, unweighted, mg) and returns: ddf