def get_or_create_index(self):
        """
        Returns an index object.

        Creats the index if it does not exist
        """
        # Try to return a storage object that was created before.
        try:
            return self.storage
        except __HOLE__:
            pass
        path = self.get_index_path()
        if path != 'ram' and exists_in(path):
            return open_dir(path)
        return self.create_index()
dataset/ETHPy150Open OpenSlides/OpenSlides/openslides/utils/search.py/Index.get_or_create_index