code: def default_tool_tips(
      result_object, learning_curves, include_run_info=False
  ):
      tool_tips = {}
      id2conf = result_object.get_id2config_mapping()
  
      for id in learning_curves.keys():
          config = id2conf[id]["config"]
          config_info = id2conf[id]["config_info"]
  
          all_runs = result_object.get_runs_by_id(id)
          if len(all_runs) == 0:
              continue
          longest_run = all_runs[-1]
  
          while longest_run.loss is None:
              all_runs.pop()
              if len(all_runs) == 0:
                  break
              longest_run = all_runs[-1]
  
          if len(all_runs) == 0:
              continue
  
          s = [
              "id: %s" % str(id),
              "duration (sec): %f"
              % (
                  (
                      longest_run["time_stamps"]["finished"]
                      - longest_run["time_stamps"]["started"]
                  )
              ),
          ]
  
          if not longest_run.loss is None:
              s += [
                  str(k) + "=" + str(v)
                  for k, v in sorted(id2conf[id]["config"].items())
              ]
              try:
                  s += [
                      str(k) + "=" + str(v)
                      for k, v in sorted(
                          id2conf[id]["config_info"].items()
                      )
                  ]
              except:
                  pass
  
              s += ["losses: {}".format([r.loss for r in all_runs])]
              if include_run_info:
                  s += ["longest run info: {}".format(longest_run.info)]
  
          tool_tips[id] = "\n".join(s)
      return tool_tips
  
file_path: auptimizer/src/aup/Proposer/hpbandster/visualization.py
imports: import copy
  import numpy
  import scipy.stats
  import matplotlib.pyplot
  from matplotlib.widgets import CheckButtons, Button
label_desc: Use image node_id 1 for calling a global function with example usage: default_tool_tips(result_object, learning_curves, include_run_info) and returns: tool_tips