def max_positions(self):
        """Maximum input length supported by the encoder."""
        if self.embed_positions is None:
            return self.max_source_positions
        return min(self.max_source_positions, self.embed_positions.max_positions)
Maximum input length supported by the encoder.
understand_icl/fairseq/fairseq/models/transformer/transformer_encoder.py