def _init_app(self, app):
app.handle_exception = partial(self.error_router, app.handle_exception)<EOL>app.handle_user_exception = partial(self.error_router, app.handle_user_exception)<EOL>if len(self.resources) > <NUM_LIT:0>:<EOL><INDENT>for resource, urls, kwargs in self.resources:<EOL><INDENT>self._register_view(app, resource, *urls, **kwargs)<EOL><DEDENT><DEDENT>
Perform initialization actions with the given :class:`flask.Flask`
        object.

        :param app: The flask application object
        :type app: flask.Flask