code: def timeit(f):
      """Return time cost of function f."""
  
      def timed(*args, **kwargs):
          start_time = time.time()
          result = f(*args, **kwargs)
          end_time = time.time()
          print(
              "   [-] %s : %2.5f sec"
              % (f.__name__, end_time - start_time)
          )
          return result
  
      return timed
  
file_path: PaddleHub/modules/text/language_model/slda_webpage/util.py
imports: import time
  import yaml
  import numpy
  from paddlehub.common.logger import logger
  from slda_webpage.config import ModelType
label_desc: Use image node_id 5 for calling a global function with example usage: timeit(f) and returns: timed, result