code: def main_plot_histogram(trials, do_show=True, title="Loss Histogram"):
      # -- import here because file-level import is too early
      import matplotlib.pyplot as plt
  
      status_colors = default_status_colors
      Xs, Ys, Ss, Cs = zip(
          *[
              (x, y, s, status_colors[s])
              for (x, y, s) in zip(
                  trials.specs, trials.losses(), trials.statuses()
              )
              if y is not None
          ]
      )
  
      # XXX: deal with ok vs. un-finished vs. error trials
      print("Showing Histogram of %i jobs" % len(Ys))
      plt.hist(Ys)
      plt.xlabel("loss")
      plt.ylabel("frequency")
  
      plt.title(title)
      if do_show:
          plt.show()
  
file_path: hyperopt/hyperopt/plotting.py
imports: import pickle
  import numpy
  from .None import base
  from .base import miscs_to_idxs_vals
label_desc: Use image node_id 2 for calling a global function with example usage: main_plot_histogram(trials, do_show, title) without return types