class_docstr: A context manager that tracks call count and latency, and other stats.
  
  Usage:
      sw = stopwatch.Stopwatch()
      with sw("foo"):
        foo()
      with sw("bar"):
        bar()
      @sw.decorate
      def func():
        pass
      func()
      print(sw)
class_docstr_tok: ["A","context","manager","that","tracks","call","count","and","latency",",","and","other","stats",".","Usage",":","sw","=","stopwatch.Stopwatch","(",")","with","sw","(","``","foo","''",")",":","foo","(",")","with","sw","(","``","bar","''",")",":","bar","(",")","@","sw.decorate","def","func","(",")",":","pass","func","(",")","print","(","sw",")"]
docstr: Parse the output below to create a new StopWatch.
docstr_tok: ["Parse","the","output","below","to","create","a","new","StopWatch","."]
code: def parse(s):
      """Parse the output below to create a new StopWatch."""
      stopwatch = StopWatch()
      for line in s.splitlines():
          if line.strip():
              parts = line.split(None)
              name = parts[0]
              if name != "%":  # ie not the header line
                  rest = (float(v) for v in parts[2:])
                  stopwatch.times[parts[0]].merge(Stat.build(*rest))
      return stopwatch
  
imports: import collections
  import functools
  import math
  import os
  import sys
  import threading
  import time
label_desc: Use image node_id 16 for calling the StopWatch obj's underlying member method code with example usage: obj.parse(s) and returns: stopwatch