code: def reset_local(self):
          
          if getattr(self, 'num', None) is None:
              self.num_inst = 0
              self.sum_metric = 0.0
          else:
              self.num_inst = [0] * self.num
              self.sum_metric = [0.0] * self.num
docs: override reset behavior