docstr: Timer callback that aggregates timings for each stage of model execution
          
docstr_tok: ["Timer","callback","that","aggregates","timings","for","each","stage","of","model","execution"]
code: def __init__(self, time_keys=()):
      """Timer callback that aggregates timings for each stage of model execution"""
      super(TimerMetric, self).__init__(name="timer")
      self.t0 = time.time()
      self.time_dict = {}
      # self.init_keys()
      self.batch_timer = _TimerMetric("t_batch")
      self.epoch_timer = _TimerMetric("t_epoch")
      self.train_timer = _TimerMetric("t_train")
      self.valid_timer = _TimerMetric("t_valid")
      self.total_timer = _TimerMetric("t_total")
      self.time_keys = time_keys
      self.added_callback = False
  
imports: from __future__ import print_function
  import sys
  import time
  from torchbearer.callbacks import Callback
  import torchbearer
  from torchbearer.metrics import Metric
label_desc: Use image node_id 1 to create a new TimerMetric object from inherited base classes: Callback, Metric with example: obj = TimerMetric(time_keys)