code: def ctime(message=None):
      "Counts the time spent in some context"
      t = time.time()
      yield
      if message:
          print message + ":\t",
      print round(time.time() - t, 4), "secf ctime(message=None):
      "Counts the time spent in some context"
      t = time.time()
      yield
      if message:
          print message + ":\t",
      print round(time.time() - t, 4), "sec"
docs: Counts the time spent in some context