def find_assistant():  # Taken from Flask-ask courtesy of @voutilad
    """
    Find our instance of Assistant, navigating Local's and possible blueprints.

    Note: This only supports returning a reference to the first instance
    of Assistant found.
    """
    if hasattr(current_app, "assist"):
        return getattr(current_app, "assist")
    else:
        if hasattr(current_app, "blueprints"):
            blueprints = getattr(current_app, "blueprints")
            for blueprint_name in blueprints:
                if hasattr(blueprints[blueprint_name], "assist"):
                    return getattr(blueprints[blueprint_name], "assist")
def find_assistant ( ) : if hasattr ( current_app , "assist" ) : return getattr ( current_app , "assist" ) else : if hasattr ( current_app , "blueprints" ) : blueprints = getattr ( current_app , "blueprints" ) for blueprint_name in blueprints : if hasattr ( blueprints [ blueprint_name ] , "assist" ) : return getattr ( blueprints [ blueprint_name ] , "assist" )
Find our instance of Assistant, navigating Local's and possible blueprints.

    Note: This only supports returning a reference to the first instance
    of Assistant found.