<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def init_app(self, app):
 """ Initializes a Flask app object for the extension. Args: app(Flask):
 Flask app """

        app.config.setdefault('FEDORA_BASE_URL', 'http://localhost:8080')
        if hasattr(app, 'teardown_appcontext'):
            app.teardown_appcontext(self.teardown)
        else:
            app.teardown_request(self.teardown)