code: def test_rmat_return_type(graph_type):
      """
      Verifies that the return type returned by rmat() is valid (or the proper
      exception is raised) based on inputs.
  
      """
      scale = 2
      num_edges = (2**scale) * 4
  
      if graph_type not in [cugraph.Graph, None]:
          with pytest.raises(TypeError):
              _call_rmat(scale, num_edges, graph_type)
  
      else:
          G_or_df = _call_rmat(scale, num_edges, graph_type)
  
          if graph_type is None:
              assert type(G_or_df) is cudf.DataFrame
          else:
              assert type(G_or_df) is graph_type
  
file_path: cugraph/python/cugraph/cugraph/tests/generators/test_rmat.py
imports: import pytest
  import cudf
  import cugraph
  from cugraph.generators import rmat
  from cupy.sparse import coo_matrix, triu, tril
  import numpy
  import cupy
label_desc: Use image node_id 6 for calling a global function with example usage: test_rmat_return_type(graph_type) without return types