    def _truncate(self, tokens):
        """
        truncate a set of tokens using the provided sequence length
        """
        if len(tokens) > self._max_sequence_length:
            tokens = tokens[: self._max_sequence_length]
        return tokens
truncate a set of tokens using the provided sequence length
allennlp/data/dataset_readers/text_classification_json.py