code: def _ensure_args_rmat(
      scale=None,
      num_edges=None,
      a=None,
      b=None,
      c=None,
      n_edgelists=None,
      min_scale=None,
      max_scale=None,
      edge_factor=None,
      size_distribution=None,
      edge_distribution=None,
      seed=None,
      clip_and_flip=None,
      scramble_vertex_ids=None,
      include_edge_weights=None,
      minimum_weight=None,
      maximum_weight=None,
      dtype=None,
      include_edge_ids=None,
      include_edge_types=None,
      min_edge_type_value=None,
      max_edge_type_value=None,
      create_using=None,
      mg=None,
      multi_rmat=False,
  ):
      """
      Ensures the args passed in are usable for the rmat() or multi rmat() API,
      raises the appropriate exception if incorrect, else returns None.
      """
      if create_using is not None:
          if isinstance(create_using, cugraph.Graph):
              directed = create_using.is_directed()
              if mg and not directed:
                  raise TypeError(
                      "Only directed cugraph.Graph and None "
                      "are supported types for `create_using` "
                      "and `directed` for multi-GPU R-MAT"
                  )
          elif create_using not in _graph_types:
              raise TypeError(
                  "create_using must be a cugraph.Graph "
                  "(or subclass) type or instance, got: "
                  f"{type(create_using)}"
              )
  
      if not isinstance(seed, int):
          raise TypeError("'seed' must be an int")
      if include_edge_weights:
          if not isinstance(include_edge_weights, bool):
              raise TypeError("'include_edge_weights' must be a bool")
          if maximum_weight is None or minimum_weight is None:
              raise ValueError(
                  "'maximum_weight' and 'minimum_weight' must not be 'None' "
                  "if 'include_edge_weights' is True"
              )
          if dtype not in [
              np.float32,
              np.float64,
              cp.float32,
              cp.float64,
              "float32",
              "float64",
          ]:
              raise ValueError(
                  "dtype must be either numpy or cupy 'float32' or 'float64' if "
                  "'include_edge_weights' is True."
              )
      if include_edge_ids:
          if not isinstance(include_edge_ids, bool):
              raise TypeError("'include_edge_ids' must be a bool")
      if include_edge_types:
          if not isinstance(include_edge_types, bool):
              raise TypeError("'include_edge_types' must be a bool")
          if (
              min_edge_type_value is None
              and max_edge_type_value is None
          ):
              raise ValueError(
                  "'min_edge_type_value' and 'max_edge_type_value' must not be 'None' "
                  "if 'include_edge_types' is True"
              )
  
      if multi_rmat:
          if not isinstance(n_edgelists, int):
              raise TypeError("'n_edgelists' must be an int")
          if not isinstance(min_scale, int):
              raise TypeError("'min_scale' must be an int")
          if not isinstance(max_scale, int):
              raise TypeError("'max_scale' must be an int")
          if not isinstance(edge_factor, int):
              raise TypeError("'edge_factor' must be an int")
          if size_distribution not in [0, 1]:
              raise TypeError(
                  "'size_distribution' must be either 0 or 1"
              )
          if edge_distribution not in [0, 1]:
              raise TypeError(
                  "'edge_distribution' must be either 0 or 1"
              )
      else:
          if not isinstance(scale, int):
              raise TypeError("'scale' must be an int")
          if not isinstance(num_edges, int):
              raise TypeError("'num_edges' must be an int")
          if a + b + c > 1:
              raise ValueError(
                  "a + b + c should be non-negative and no larger than 1.0"
              )
          if not isinstance(clip_and_flip, bool):
              raise TypeError("'clip_and_flip' must be a bool")
          if not isinstance(scramble_vertex_ids, bool):
              raise TypeError("'scramble_vertex_ids' must be a bool")
  
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 1 for calling a global function with example usage: _ensure_args_rmat(scale, num_edges, a, b, c, n_edgelists, min_scale, max_scale, edge_factor, size_distribution, edge_distribution, 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, mg, multi_rmat) without return types