def get_index(dataset: Dataset, loader: Loader[(Dataset, Entity)]) -> Index[(Dataset, Entity)]:
    'Load the search index for the given dataset or generate one if it does\n    not exist.'
    path = get_index_path(dataset)
    index = Index.load(loader, path)
    return index
Load the search index for the given dataset or generate one if it does
not exist.
def get_index(dataset: Dataset, loader: Loader[(Dataset, Entity)]) -> Index[(Dataset, Entity)]:
    'Load the search index for the given dataset or generate one if it does\n    not exist.'
    path = get_index_path(dataset)
    index = Index.load(loader, path)
    return index