code: def merge_metrics(self):
          
  
          self.metrics.extend(self._metrics.values())
          del self._metrics
docs: Merge metrics in the internal _metrics dict to metrics list
          and delete the internal _metrics