def before_first_request(self, func: Callable, name: AppOrBlueprintKey=None) -> Callable:
        """Add a before **first** request function.

        This is designed to be used as a decorator. An example usage,

        .. code-block:: python

            @app.before_first_request
            def func():
                ...

        Arguments:
            func: The before first request function itself.
            name: Optional blueprint key name.
        """
        handler = ensure_coroutine(func)
        self.before_first_request_funcs.append(handler)
        return func
Add a before **first** request function.

        This is designed to be used as a decorator. An example usage,

        .. code-block:: python

            @app.before_first_request
            def func():
                ...

        Arguments:
            func: The before first request function itself.
            name: Optional blueprint key name.