class_docstr: Abstract class for meters used in metric stats.
  Every subclass has cached values for some metric
  
  Parameters
  ----------
  min_mode: bool or None
      if set to true, the smaller value is considered better and vice versa;
      if set to None, no optimality is defined.
docstr: reset the meter to clear the cached values;
  
  at the same time, the optimal value so far is compared with current metric and updated
docstr_tok: ["reset","the","meter","to","clear","the","cached","values",";","at","the","same","time",",","the","optimal","value","so","far","is","compared","with","current","metric","and","updated"]
code: def restart(self) -> None:
      """
      reset the meter to clear the cached values;
  
      at the same time, the optimal value so far is compared with current metric and updated
      """
      if self.is_optimal:
          self.best = self.value
      self._initialize()
  
imports: from __future__ import annotations
  import time
  import warnings
  from abc import ABC, abstractmethod
  from typing import Optional, Union
  from torch import Tensor
  from ..engine.distributed import reduce_value
label_desc: Use image node_id 3 for calling the Meter obj's underlying member method code with example usage: obj.restart() without return types