class_docstr: Base class for hooks based on summary metrics.
  
  Subclasses should override _process_metrics.
  
  If _process_metrics returns True, calls run_context.request_stop().
  
  This can be used to something like "Stop after the loss has stopped decreasing
  for 5000 steps.
code: def _collect_metrics(self):
      self._event_multiplexer.Reload()
      subdir_data = {}
      for i, subdir in enumerate(self._subdirs):
          subdir_metrics = {}
  
          accum = self._event_multiplexer.GetAccumulator(
              self._RUN_NAME % i
          )
          for tag in accum.Tags()[event_accumulator.SCALARS]:
              steps, vals = zip(
                  *[
                      (event.step, event.value)
                      for event in accum.Scalars(tag)
                  ]
              )
              subdir_metrics[tag] = (steps, vals)
  
          subdir_data[subdir] = subdir_metrics
      return subdir_data
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import tensorflow.compat.v1
  from tensorboard.backend.event_processing import event_accumulator
  from tensorboard.backend.event_processing import event_multiplexer
label_desc: Use image node_id 8 for calling the MetricsBasedHook obj's underlying member method code with example usage: obj._collect_metrics() and returns: subdir_data