<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_app(debug=False):
 """ Create the flask app :param debug: Use debug mode :type debug: bool :return: Created app :rtype: flask.Flask """

    app = Flask(__name__)
    app.secret_key = str(uuid.uuid4())
    app.json_encoder = DateTimeEncoder
    app.register_blueprint(page)
    Bower(app)
    api = Api(app)
    api.add_resource(
        PluginListAPI,
        api_path + "plugins/",
        endpoint="APIPlugins"
    )
    api.add_resource(
        PluginAPI,
        api_path + "plugins/<plugin_key>",
        endpoint="APIPlugin"
    )
    api.add_resource(
        PluginResourceAPI,
        api_path + "plugins/<plugin_key>/resources/",
        endpoint="APIPluginResource"
    )

    if debug:
        # Setup app for real debuging mode
        app.debug = True
        # Force update of static files (even in dev mode, browsers still cache)
        app.config['SEND_FILE_MAX_AGE_DEFAULT'] = 0

        @app.after_request
        def add_header(response):
            response.headers['Cache-Control'] = "public, max-age=0"
            return response
    return app