def METHOD_NAME(
    k: int, y_pred: npt.NDArray[np.float32], y_true: npt.NDArray[np.float32]
) -> npt.NDArray[np.float32]:
    """
    Computes the precision@k of the predictions.
    Args:
        k: The number of items that are looked at for computing the precision.
        y_pred: Array of shape [N, D] with the predictions (N: number of elements, D: number of
            metrics).
        y_true: Array of shape [N, D] with the true metrics.
    Returns:
        Array of shape [D] with the precisions@k for each metric.
    """
    pred_ranks = st.rankdata(y_pred, method="ordinal", axis=0) - 1  # [N, D]
    true_ranks = st.rankdata(y_true, method="ordinal", axis=0) - 1  # [N, D]
    pred_relevance = (pred_ranks < k) / k  # [N, D]
    true_relevance = true_ranks < k  # [N, D]
    return (pred_relevance * true_relevance).sum(0)