code: def test_rmat_clip_and_flip(
      scale, include_edge_weights, clip_and_flip
  ):
      """
      Verifies that there are edges only in the lower triangular part of
      the adjacency matrix when 'clip_and_flip' is set to 'true'.
  
      Note: 'scramble_vertex_ids' nullifies the effect of 'clip_and_flip' therefore
      both flags should not be set to 'True' in order to test the former
  
      """
      num_edges = (2**scale) * 4
      create_using = None  # Returns the edgelist from RMAT
      minimum_weight = 0
      maximum_weight = 1
      dtype = np.float32
      df = _call_rmat(
          scale,
          num_edges,
          create_using,
          clip_and_flip=clip_and_flip,
          scramble_vertex_ids=False,
          include_edge_weights=include_edge_weights,
          dtype=dtype,
          minimum_weight=minimum_weight,
          maximum_weight=maximum_weight,
      )
  
      if not include_edge_weights:
          df["weights"] = 1
          # cupy coo_matrix only support 'float32', 'float64', 'complex64'
          # and 'complex128'.
          df["weights"] = df["weights"].astype("float32")
  
      dim = df[["src", "dst"]].max().max() + 1
      src = df["src"].to_cupy()
      dst = df["dst"].to_cupy()
      weights = df["weights"].to_cupy()
      adj_matrix = coo_matrix(
          (weights, (src, dst)), shape=(dim, dim)
      ).toarray()
  
      upper_coo = triu(adj_matrix)
      diag = tril(upper_coo)
  
      if clip_and_flip:
          # Except the diagonal, There should be no edge in the upper triangular part of
          # the graph adjacency matrix.
          assert diag.nnz == upper_coo.nnz
  
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 5 for calling a global function with example usage: test_rmat_clip_and_flip(scale, include_edge_weights, clip_and_flip) without return types