code: def print_summary(trials, offset=0):
      """Print a summary of the current experiment.
  
      Parameters
      ----------
      trials: list
          Trials to summarize.
      offset: int, optional
          The number of tabs to the right this experiment is.
  
      """
      status_dict = collections.defaultdict(list)
  
      for trial in trials:
          status_dict[trial.status].append(trial)
  
      headers = ["status", "quantity"]
  
      lines = []
      for status, c_trials in sorted(status_dict.items()):
          line = [status, len(c_trials)]
  
          if c_trials[0].objective:
              headers.append(f"min {c_trials[0].objective.name}")
              line.append(
                  min(
                      trial.objective.value
                      for trial in c_trials
                      if trial.objective
                  )
              )
  
          lines.append(line)
  
      if trials:
          grid = tabulate.tabulate(lines, headers=headers)
          tab = " " * offset
          print(tab + ("\n" + tab).join(grid.split("\n")))
      else:
          print(" " * offset, "empty", sep="")
  
      print("\n")
  
file_path: orion/src/orion/core/cli/status.py
imports: import collections
  import logging
  import tabulate
  from orion.core.cli import base
  from orion.core.io import experiment_builder
label_desc: Use image node_id 8 for calling a global function with example usage: print_summary(trials, offset) without return types