class_docstr: A running stat for conveniently logging the duration of a code block.
  
  Note that this class is *not* thread-safe.
  
  Examples:
      Time a call to 'time.sleep'.
  
      >>> import time
      >>> sleep_timer = TimerStat()
      >>> with sleep_timer:
      ...     time.sleep(1)
      >>> round(sleep_timer.mean)
      1
class_docstr_tok: ["A","running","stat","for","conveniently","logging","the","duration","of","a","code","block",".","Note","that","this","class","is","*","not","*","thread-safe",".","Examples",":","Time","a","call","to","'time.sleep","'",".",">",">",">","import","time",">",">",">","sleep_timer","=","TimerStat","(",")",">",">",">","with","sleep_timer",":","...","time.sleep","(","1",")",">",">",">","round","(","sleep_timer.mean",")","1"]
code: def reset(self):
      self._samples = []
      self._units_processed = []
      self._start_time = None
      self._total_time = 0.0
      self.count = 0
  
imports: import time
  import numbers
  import socket
  import collections
  import numpy
  from contextlib import closing, contextmanager
  import torch
  from bigdl.dllib.utils.log4Error import *
label_desc: Use image node_id 15 for calling the TimerStat obj's underlying member method code with example usage: obj.reset() without return types