code: def notify_step_begin_end(func):
      
  
      @ft.wraps(func)
      def wrapper(self, *args, **kwargs):
          """Wrapper stub."""
          cls = self.__class__
          on_step_begin = cls.ON_STEP_BEGIN
          on_step_end = cls.ON_STEP_END
  
          for begin_listener in on_step_begin:
              begin_listener(self)
  
          res = func(self, *args, **kwargs)
  
          for end_listener in on_step_end:
              end_listener(self, func)
          return res
  
      return wrapper
docs: Print the beginning and the end of a `func`.