def METHOD_NAME(self, labels: torch.Tensor) -> torch.Tensor:
    """Encode source label sequences.
    Args:
        labels: Label ID sequences. (B, L)
    Returns:
        out: Decoder output sequences. (B, U, D_dec)
    """
    states = self.init_state(labels.size(0))
    embed = self.dropout_embed(self.embed(labels))
    out, _ = self.rnn_forward(embed, states)
    return out