code: def find_assistant():  # Taken from Flask-ask courtesy of @voutilad
      
      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")
docs: 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.