docs: def create_index(cls, app, wh):
          """Creates and opens an index for the given whoosheer and app.
          If the index already exists, it just opens it, otherwise it creates
          it first.
  
          :param app: The application instance.
          :param wh: The whoosheer instance for which a index should be created.
          """
          # TODO: do we really want/need to use camel casing?
          # everywhere else, there is just .lower()
          if app.extensions['whooshee']['memory_storage']:
              storage = RamStorage()
              index = storage.create_index(wh.schema)
              assert index
              return index
          else:
              index_path = os.path.join(app.extensions['whooshee']['index_path_root'],
                                        getattr(wh, 'index_subdir', cls.camel_to_snake(wh.__name__)))
              if whoosh.index.exists_in(index_path):
                  index = whoosh.index.open_dir(index_path)
              else:
                  if not os.path.exists(index_path):
                      os.makedirs(index_path)
                  index = whoosh.index.create_in(index_path, wh.schema)
              return index