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
code: def median(self):
      return np.median(self._samples)
  
imports: import collections
  from contextlib import closing, contextmanager
  import logging
  import numpy
  import socket
  import time
label_desc: Use image node_id 7 for calling the TimerStat obj's underlying member method code with example usage: obj.median() and returns: np