code: def toc(message=None, print_string=True):
      """
      Stop counting time.
      :param message: additional message to print;
      :param print_string: whether to print the string to stdout;
      """
      fmt = "Elapsed: {:.2f}s"
      try:
          output = fmt.format(time.time() - TIME_STACK.pop())
          if message:
              output = str(message) + "\n" + output
          log(output, print_string=print_string)
      except IndexError:
          print("You have to tic() before you toc()\n")
  
imports: import os
  import time
  from pprint import pformat
label_desc: Use image node_id 4 for calling a global function with example usage: toc(message, print_string) without return types