def METHOD_NAME(self, emb: Tensor, k: int) -> KNNOutput:
    r"""Search for the :math:`k` nearest neighbors of the given data
    points. Returns the distance/similarity score of the nearest neighbors
    and their indices.
    Args:
        emb (torch.Tensor): The data points to add.
        k (int): The number of nearest neighbors to return.
    """
    if self.index is None:
        raise RuntimeError(f"'{self.__class__.__name__}' is not yet "
                           "initialized. Please call `add(...)` first.")
    if emb.dim() != 2:
        raise ValueError(f"'emb' needs to be two-dimensional "
                         f"(got {emb.dim()} dimensions)")
    return KNNOutput(*self.index.METHOD_NAME(emb.detach(), k))