code: def get_or_create_index(cls, app, wh):
          
          if wh in app.extensions['whooshee']['whoosheers_indexes']:
              return app.extensions['whooshee']['whoosheers_indexes'][wh]
          index = cls.create_index(app, wh)
          app.extensions['whooshee']['whoosheers_indexes'][wh] = index
          return index
docs: Gets a previously cached index or creates a new one for the
          given app and whoosheer.
  
          :param app: The application instance.
          :param wh: The whoosheer instance for which the index should be
                     retrieved or created.