def _app_or_default(app=None):
 if (app is None):
  return (getattr(_tls, 'current_app', None) or default_app)
 return app

def _app_or_default ( app = None ) : if ( app is None ) : return ( getattr ( _tls , 'current_app' , None ) or default_app ) return app
returns the app provided or the default app if none .