code: def run(
      algos,
      scale=None,
      csv_graph_file=None,
      csv_results_file=None,
      unweighted=False,
      symmetric=False,
      edgefactor=None,
      benchmark_dir=None,
      dask_scheduler_file=None,
      rmm_pool_size=None,
  ):
      """
      Run the nightly benchmark on cugraph.
      Return True on success, False on failure.
      """
      seed = 42
      n_gpus = len(get_visible_devices())
      if (dask_scheduler_file is None) and (n_gpus < 2):
          funcs = cugraph_funcs
      else:
          funcs = cugraph_dask_funcs
          # For MNMG, find the number of GPUS after the client and
          # and the cluster started
          n_gpus = None
  
      # Setup the benchmarks to run based on algos specified, or all.
      # Values are either callables, or tuples of (callable, args) pairs.
      benchmarks = {
          "bfs": funcs.bfs,
          "sssp": funcs.sssp,
          "louvain": funcs.louvain,
          "pagerank": funcs.pagerank,
          "wcc": funcs.wcc,
          "katz": funcs.katz,
          "wcc": funcs.wcc,
          "hits": funcs.hits,
          "uniform_neighbor_sample": funcs.uniform_neighbor_sample,
          "triangle_count": funcs.triangle_count,
          "eigenvector_centrality": funcs.eigenvector_centrality,
      }
  
      if algos:
          invalid_benchmarks = set(algos) - set(benchmarks.keys())
          if invalid_benchmarks:
              raise ValueError(
                  "Invalid benchmark(s) specified "
                  f"{invalid_benchmarks}"
              )
          benchmarks_to_run = [benchmarks[b] for b in algos]
      else:
          benchmarks_to_run = list(benchmarks.values())
  
      # Call the global setup. This is used for setting up Dask, initializing
      # output files/reports, etc.
      log("calling setup...", end="")
      setup_objs = funcs.setup(dask_scheduler_file, rmm_pool_size)
  
      # If the number of GPUs is None, This is a MNMG run
      # Extract the number of gpus from the client
      if n_gpus is None:
          n_gpus = len(setup_objs[0].scheduler_info()["workers"])
      log("done.")
  
      try:
          if csv_graph_file:
              log("running read_csv...", end="")
              df = funcs.read_csv(csv_graph_file, 0)
              log("done.")
          elif scale:
              log("running generate_edgelist (RMAT)...", end="")
              df = funcs.generate_edgelist(
                  scale,
                  edgefactor=edgefactor,
                  seed=seed,
                  unweighted=unweighted,
              )
              log("done.")
          else:
              raise ValueError(
                  "Must specify either scale or csv_graph_file"
              )
  
          benchmark = BenchmarkRun(
              df,
              (funcs.construct_graph, (symmetric,)),
              benchmarks_to_run,
          )
          success = benchmark.run()
  
          algo_name = benchmark.results[1].name
          algo_name = f"benchmarks.{algo_name}"
          algo_time = benchmark.results[1].runtime
          # Generate json files containing the benchmark results
          if benchmark_dir is not None:
              store_results_json(
                  benchmark_dir, algo_name, algo_time, n_gpus, scale
              )
  
          # Report results
          print(generate_console_report(benchmark.results))
          if csv_results_file:
              update_csv_report(
                  csv_results_file, benchmark.results, n_gpus
              )
  
      except:
          success = False
          raise
  
      finally:
          # Global cleanup
          log("calling teardown...", end="")
          funcs.teardown(*setup_objs)
          log("done.")
  
      return 0 if success else 1
  
file_path: cugraph/benchmarks/cugraph/standalone/main.py
imports: import sys
  from cugraph.dask.common.mg_utils import get_visible_devices
  from reporting import generate_console_report, update_csv_report
  import cugraph_funcs
  import cugraph_dask_funcs
  from benchmark import BenchmarkRun
  import json
  from pathlib import Path
label_desc: Use image node_id 3 for calling a global function with example usage: run(algos, scale, csv_graph_file, csv_results_file, unweighted, symmetric, edgefactor, benchmark_dir, dask_scheduler_file, rmm_pool_size) and returns: unknown