code: def url_defaults(self, func: Callable, name: AppOrBlueprintKey=None) -> Callable:
          
          self.url_default_functions[name].append(func)
          return func
docs: Add a url default preprocessor.
  
          This is designed to be used as a decorator. An example usage,
  
          .. code-block:: python
  
              @app.url_defaults
              def default(endpoint, values):
                  ...