code: def endpoint(self, endpoint: str) -> Callable:
          
          def decorator(func: Callable) -> Callable:
              handler = ensure_coroutine(func)
              self.view_functions[endpoint] = handler
              return func
          return decorator
docs: Register a function as an endpoint.
  
          This is designed to be used as a decorator. An example usage,
  
          .. code-block:: python
  
              @app.endpoint('name')
              def endpoint():
                  ...
  
          Arguments:
              endpoint: The endpoint name to use.