code: def run_bench(X, clfs, plot_name, n_components, tol, alpha, l1_ratio):
      start = time()
      results = []
      for name, clf_type, iter_range, clf_params in clfs:
          print("Training %s:" % name)
          for rs, init in enumerate(("nndsvd", "nndsvdar", "random")):
              print(
                  "    %s %s: " % (init, " " * (8 - len(init))), end=""
              )
              W, H = _initialize_nmf(X, n_components, init, 1e-6, rs)
  
              for max_iter in iter_range:
                  clf_params["alpha"] = alpha
                  clf_params["l1_ratio"] = l1_ratio
                  clf_params["max_iter"] = max_iter
                  clf_params["tol"] = tol
                  clf_params["random_state"] = rs
                  clf_params["init"] = "custom"
                  clf_params["n_components"] = n_components
  
                  this_loss, duration = bench_one(
                      name,
                      X,
                      W,
                      H,
                      X.shape,
                      clf_type,
                      clf_params,
                      init,
                      n_components,
                      rs,
                  )
  
                  init_name = "init='%s'" % init
                  results.append((name, this_loss, duration, init_name))
                  # print("loss: %.6f, time: %.3f sec" % (this_loss, duration))
                  print(".", end="")
                  sys.stdout.flush()
              print(" ")
  
      # Use a panda dataframe to organize the results
      results_df = pandas.DataFrame(
          results, columns="method loss time init".split()
      )
      print("Total time = %0.3f sec\n" % (time() - start))
  
      # plot the results
      plot_results(results_df, plot_name)
      return results_df
  
imports: import numbers
  import sys
  import warnings
  from time import time
  import matplotlib.pyplot
  import numpy
  import pandas
  from joblib import Memory
  from sklearn.decomposition import NMF
  from sklearn.decomposition._nmf import _beta_divergence, _check_init, _initialize_nmf
  from sklearn.exceptions import ConvergenceWarning
  from sklearn.feature_extraction.text import TfidfVectorizer
  from sklearn.utils import check_array
  from sklearn.utils._testing import ignore_warnings
  from sklearn.utils.extmath import safe_sparse_dot, squared_norm
  from sklearn.utils.validation import check_is_fitted, check_non_negative
label_desc: Use image node_id 6 for calling a global function with example usage: run_bench(X, clfs, plot_name, n_components, tol, alpha, l1_ratio) and returns: results_df