code: def update_speed(self, iteration, epoch_detail):
      now = time.time()
      self._recent_timing.append((iteration, epoch_detail, now))
      old_t, old_e, old_sec = self._recent_timing[0]
      span = now - old_sec
      if span != 0:
          speed_t = (iteration - old_t) / span
          speed_e = (epoch_detail - old_e) / span
      else:
          speed_t = float("inf")
          speed_e = float("inf")
      return speed_t, speed_e
  
file_path: chainer/chainer/training/extensions/util.py
imports: import collections
  import os
  import sys
  import time
label_desc: Use image node_id 2 for calling the ProgressBar obj's underlying member method code with example usage: obj.update_speed(iteration, epoch_detail) and returns: speed_t,  speed_e