code: def call_after(lag):
    
    def decorator(func):
      @wraps(func)
      def wrapper(*args, **kwargs):
        wrapper.timer.cancel() # Debounce
        wrapper.timer = threading.Timer(lag, func, args=args, kwargs=kwargs)
        wrapper.timer.start()
      wrapper.timer = threading.Timer(0, lambda: None) # timer.cancel now exists
      return wrapper
    return decorator
docs: Parametrized decorator for calling a function after a time ``lag`` given
    in milliseconds. This cancels simultaneous calls.