def METHOD_NAME(
    self,
    y: torch.Tensor,
    state: Union[torch.Tensor, Tuple[torch.Tensor, torch.Tensor]],
    x: torch.Tensor,
) -> Tuple[torch.Tensor, Union[torch.Tensor, Tuple[torch.Tensor, torch.Tensor]]]:
    """Score new token.
    Args:
        y: 1D torch.int64 prefix tokens.
        state: Scorer state for prefix tokens
        x: 2D encoder feature that generates ys.
    Returns:
        Tuple of
            torch.float32 scores for next token (n_vocab)
            and next state for ys
    """
    y, new_state = self(y[-1].view(1, 1), state)
    logp = y.log_softmax(dim=-1).view(-1)
    return logp, new_state