docs: def get_index(cls, model, via_class=False):
          '''
          Returns the index name (as a string) for the given model as a class or a string.
          :param model: model name or model class if via_class set to True.
          :param via_class: set to True if parameter model is a class.
          :raise KeyError: If the provided model does not have any index associated.
          '''
          try:
              return cls._model_to_index[model] if via_class else cls._model_name_to_index[model]
          except KeyError:
              raise KeyError('Could not find any index defined for model {}. Is the model in one of the model index modules of BUNGIESEARCH["INDICES"]?'.format(model))