def METHOD_NAME(self, Q: torch.Tensor, k=10):
    if k <= 10:
        if self.config.ncells is None:
            self.configure(ncells=1)
        if self.config.centroid_score_threshold is None:
            self.configure(centroid_score_threshold=0.5)
        if self.config.ndocs is None:
            self.configure(ndocs=256)
    elif k <= 100:
        if self.config.ncells is None:
            self.configure(ncells=2)
        if self.config.centroid_score_threshold is None:
            self.configure(centroid_score_threshold=0.45)
        if self.config.ndocs is None:
            self.configure(ndocs=1024)
    else:
        if self.config.ncells is None:
            self.configure(ncells=4)
        if self.config.centroid_score_threshold is None:
            self.configure(centroid_score_threshold=0.4)
        if self.config.ndocs is None:
            self.configure(ndocs=max(k * 4, 4096))
    pids, scores = self.ranker.rank(self.config, Q, k)
    return pids[:k], list(range(1, k+1)), scores[:k]