code: def find_rak():
      
      if hasattr(current_app, 'rak'):
          return getattr(current_app, 'rak')
      else:
          if hasattr(current_app, 'blueprints'):
              blueprints = getattr(current_app, 'blueprints')
              for blueprint_name in blueprints:
                  if hasattr(blueprints[blueprint_name], 'rak'):
                      return getattr(blueprints[blueprint_name], 'rak')
docs: Find our instance of Rak, navigating Local's and possible blueprints.