code: def timeit(method):
      """
      The timing decorator to wrap the functions
      """
  
      def timed(*args, **kw):
          ts = time.time()
          result = method(*args, **kw)
          te = time.time()
          logging.info(
              "{} runtime: {:.04f} msec".format(
                  method.__name__, (te - ts) * 1000
              )
          )
          return result
  
      return timed
  
imports: import time
  import logging
  from contextlib import contextmanager
  import mxnet
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: timeit(method) and returns: timed, result