<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def setup_app(app, throw=True):
 """ Ensure application is set up to expected configuration. This function is typically triggered by the worker_init signal, however it must be called manually by codebases that are run only as task producers or from within a Python shell. """

    success = True
    try:
        for func in SETUP_FUNCS:
            try:
                func(app)
            except Exception:
                success = False
                if throw:
                    raise
                else:
                    msg = "Failed to run setup function %r(app)"
                    logger.exception(msg, func.__name__)
    finally:
        setattr(app, 'is_set_up', success)