code: def print_summary(
      algo,
      measures,
      test_measures,
      train_measures,
      fit_times,
      test_times,
      n_splits,
  ):
      """Helper for printing the result of cross_validate."""
  
      print(
          "Evaluating {} of algorithm {} on {} split(s).".format(
              ", ".join(m.upper() for m in measures),
              algo.__class__.__name__,
              n_splits,
          )
      )
      print()
  
      row_format = "{:<18}" + "{:<8}" * (n_splits + 2)
      s = row_format.format(
          "",
          *[f"Fold {i + 1}" for i in range(n_splits)]
          + ["Mean"]
          + ["Std"],
      )
      s += "\n"
      s += "\n".join(
          row_format.format(
              key.upper() + " (testset)",
              *[f"{v:1.4f}" for v in vals]
              + [f"{np.mean(vals):1.4f}"]
              + [f"{np.std(vals):1.4f}"],
          )
          for (key, vals) in test_measures.items()
      )
      if train_measures:
          s += "\n"
          s += "\n".join(
              row_format.format(
                  key.upper() + " (trainset)",
                  *[f"{v:1.4f}" for v in vals]
                  + [f"{np.mean(vals):1.4f}"]
                  + [f"{np.std(vals):1.4f}"],
              )
              for (key, vals) in train_measures.items()
          )
      s += "\n"
      s += row_format.format(
          "Fit time",
          *[f"{t:.2f}" for t in fit_times]
          + [f"{np.mean(fit_times):.2f}"]
          + [f"{np.std(fit_times):.2f}"],
      )
      s += "\n"
      s += row_format.format(
          "Test time",
          *[f"{t:.2f}" for t in test_times]
          + [f"{np.mean(test_times):.2f}"]
          + [f"{np.std(test_times):.2f}"],
      )
      print(s)
  
file_path: Surprise/surprise/model_selection/validation.py
imports: import time
  import numpy
  from joblib import delayed, Parallel
  from ..None import accuracy
  from .split import get_cv
label_desc: Use image node_id 3 for calling a global function with example usage: print_summary(algo, measures, test_measures, train_measures, fit_times, test_times, n_splits) without return types