'Loads the Flask app (if not yet loaded) and returns it.  Calling
this multiple times will just result in the already loaded app to
be returned.'

def load_app(self):

    __traceback_hide__ = True
    if (self._loaded_app is not None):
        return self._loaded_app
    app = None
    if (self.create_app is not None):
        app = call_factory(self.create_app, self)
    elif self.app_import_path:
        (path, name) = (self.app_import_path.split(':', 1) + [None])[:2]
        import_name = prepare_import(path)
        app = locate_app(self, import_name, name)
    else:
        for path in ('wsgi.py', 'app.py'):
            import_name = prepare_import(path)
            app = locate_app(self, import_name, None, raise_if_not_found=False)
            if app:
                break
    if (not app):
        raise NoAppException('Could    not    locate    a    Flask    application.    You    did    not    provide    the    "FLASK_APP"    environment    variable,    and    a    "wsgi.py"    or    "app.py"    module    was    not    found    in    the    current    directory.')
    debug = get_debug_flag()
    if (debug is not None):
        app._reconfigure_for_run_debug(debug)
    self._loaded_app = app
    return app
