def get_max_length(self) -> Optional[int]:
        """Returns the maximum sequence length of the cached states, if there is any."""
        raise NotImplementedError(
            "Make sure to implement `get_max_length` in a subclass."
        )
Returns the maximum sequence length of the cached states, if there is any.
smoe/utils/cache_utils.py