code: def template_global(self, name: Optional[str]=None) -> Callable:
          
          def decorator(func: Callable) -> Callable:
              self.add_template_global(func, name=name)
              return func
          return decorator
docs: Add a template global.
  
          This is designed to be used as a decorator. An example usage,
  
          .. code-block:: python
  
              @app.template_global('name')
              def five():
                  return 5
  
          Arguments:
              name: The global name (defaults to function name).