code: def _calc_num_edges_per_worker(num_workers, num_edges):
      """
      Returns a list of length num_workers with the individual number of edges
      each worker should generate. The sum of all edges in the list is num_edges.
      """
      L = []
      w = num_edges // num_workers
      r = num_edges % num_workers
      for i in range(num_workers):
          if i < r:
              L.append(w + 1)
          else:
              L.append(w)
      return L
  
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 6 for calling a global function with example usage: _calc_num_edges_per_worker(num_workers, num_edges) and returns: L