class_docstr: Test how often some code gets reached.
  
  Example:
      Print the speed of the iteration every 100 times.
  
      .. code-block:: python
  
          speed = IterSpeedCounter(100)
          for k in range(1000):
              # do something
              speed()
class_docstr_tok: ["Test","how","often","some","code","gets","reached",".","Example",":","Print","the","speed","of","the","iteration","every","100","times",".","..","code-block",":",":","python","speed","=","IterSpeedCounter","(","100",")","for","k","in","range","(","1000",")",":","#","do","something","speed","(",")"]
code: def __call__(self):
      if self.cnt == 0:
          self.reset()
      self.cnt += 1
      if self.cnt % self.print_every != 0:
          return
      t = timer() - self.start
      logger.info(
          "{}: {:.2f} sec, {} times, {:.3g} sec/time".format(
              self.name, t, self.cnt, t / self.cnt
          )
      )
  
imports: import atexit
  from collections import defaultdict
  from contextlib import contextmanager
  from time import perf_counter
  from .None import logger
  from .stats import StatCounter
label_desc: Use image node_id 3 for calling the IterSpeedCounter obj's underlying member method code with example usage: obj.__call__() without return types