<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(app):
 """ 'Initialize' flask application. It creates EmailsConfig object and saves it in app.extensions. You don't have to call this method directly. :param app: Flask application object :return: Just created :meth:`~EmailsConfig` object """

    config = EmailsConfig(app)
    # register extension with app
    app.extensions = getattr(app, 'extensions', {})
    app.extensions['emails'] = config
    return config