    def forward(self, inputs: torch.Tensor, mask: torch.BoolTensor = None) -> torch.Tensor:
        """
        # Parameters

        inputs : `torch.Tensor`, required.
            A tensor of shape (batch_size, timesteps, input_dim)
        mask : `torch.BoolTensor`, optional (default = `None`).
            A tensor of shape (batch_size, timesteps).

        # Returns

        A tensor computed by composing the sequence of encoders.
        """
        for encoder in self.encoders:
            inputs = encoder(inputs, mask)
        return inputs
# Parameters

inputs : `torch.Tensor`, required.
A tensor of shape (batch_size, timesteps, input_dim)
mask : `torch.BoolTensor`, optional (default = `None`).
A tensor of shape (batch_size, timesteps).

# Returns

A tensor computed by composing the sequence of encoders.
allennlp/modules/seq2seq_encoders/compose_encoder.py