def METHOD_NAME(
    self,
    x: torch.Tensor,
    x_len: torch.Tensor,
    processed_frames: torch.tensor,
    left_context: int = 32,
) -> torch.Tensor:
    """Encode input sequences as chunks.
    Args:
        x: Encoder input features. (1, T_in, F)
        x_len: Encoder input features lengths. (1,)
        processed_frames: Number of frames already seen.
        left_context: Number of previous frames (AFTER subsampling) the attention
                      module can see in current chunk.
    Returns:
       x: Encoder outputs. (B, T_out, D_enc)
    """
    mask = make_source_mask(x_len)
    x, mask = self.embed(x, mask)
    x = x[:, 1:-1, :]
    mask = mask[:, 1:-1]
    pos_enc = self.pos_enc(x, left_context=left_context)
    processed_mask = (
        torch.arange(left_context, device=x.device).view(1, left_context).flip(1)
    )
    processed_mask = processed_mask >= processed_frames
    mask = torch.cat([processed_mask, mask], dim=1)
    x = self.encoders.METHOD_NAME(
        x,
        pos_enc,
        mask,
        left_context=left_context,
    )
    return x