code: def _walk_decorator_stack(func: CallableT) -> Iterable['CallableT']:
      
      while hasattr(func, "__wrapped__"):
          yield func
  
          func = getattr(func, "__wrapped__")
  
      yield func
docs: Iterate through the stack of decorated functions until the original function.
  
      Assume that all decorators used functools.update_wrapper.