code: def timed(msg):
      global MESSAGE_DEPTH  # pylint: disable=W0603
      print(
          colorize("\t" * MESSAGE_DEPTH + "=: " + msg, color="magenta")
      )
      tstart = time.time()
      MESSAGE_DEPTH += 1
      yield
      MESSAGE_DEPTH -= 1
      print(
          colorize(
              "\t" * MESSAGE_DEPTH
              + "done in %.3f seconds" % (time.time() - tstart),
              color="magenta",
          )
      )
  
file_path: baselines/baselines/common/console_util.py
imports: from __future__ import print_function
  from contextlib import contextmanager
  import numpy
  import time
  import shlex
  import subprocess
label_desc: Use image node_id 8 for calling a global function with example usage: timed(msg) without return types