<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _catchall_enabled(app):
 """Check the bottle app for catchall."""

    while hasattr(app, 'app'):
        if isinstance(app, bottle.Bottle):
            break
        app = app.app
    if hasattr(app, 'catchall'):
        return app.catchall
    else:
        return bottle.default_app().catchall