code: def test_leiden(graph_file):
      edgevals = True
  
      G = graph_file.get_graph(ignore_weights=not edgevals)
      leiden_parts, leiden_mod = cugraph_leiden(G)
      louvain_parts, louvain_mod = cugraph_louvain(G)
  
      # Leiden modularity score is smaller than Louvain's
      assert leiden_mod >= (0.75 * louvain_mod)
  
file_path: cugraph/python/cugraph/cugraph/tests/community/test_leiden.py
imports: import gc
  import time
  import pytest
  import networkx
  import cugraph
  import cudf
  from cugraph.testing import utils, UNDIRECTED_DATASETS
  from cugraph.datasets import karate_asymmetric
label_desc: Use image node_id 5 for calling a global function with example usage: test_leiden(graph_file) without return types