code: def timeit(exclude_kwargs: tuple = ()) -> Callable:
      """
      timeit decorator
      Args:
          exclude_kwargs: (tuple), keyword arguments that should be excluded from display
      Returns: Callable
  
      """
  
      def wrapper(f: Callable):
          def wrapped(*args, **kw):
              ts = time.time()
              result = f(*args, **kw)
              te = time.time()
              display_kw = {
                  k: v for k, v in kw.items() if k not in exclude_kwargs
              }
              print(
                  f"Function: %s Kwargs:%r Elapsed time: %2.4f"
                  % (f.__name__, display_kw, te - ts)
              )
              return result
  
          return wrapped
  
      return wrapper
  
file_path: causalml/causalml/inference/tree/utils.py
imports: import time
  from typing import Callable
  import numpy
  import pandas
label_desc: Use image node_id 7 for calling a global function with example usage: timeit(exclude_kwargs) and returns: wrapper, wrapped, result