code: def append(self, mode, metric, step, value):
      
      if mode not in self._values:
        self._values[mode] = collections.defaultdict(list)
      self._values[mode][metric].append((step, value))
docs: Append (step, value) pair to history for the given mode and metric.