def _truncate_seq_pair(self, tokens_a, tokens_b, max_length):
<EOL>while True:<EOL><INDENT>total_length = len(tokens_a) + len(tokens_b)<EOL>if total_length <= max_length:<EOL><INDENT>break<EOL><DEDENT>if len(tokens_a) > len(tokens_b):<EOL><INDENT>tokens_a.pop()<EOL><DEDENT>else:<EOL><INDENT>tokens_b.pop()<EOL><DEDENT><DEDENT>
Truncates a sequence pair in place to the maximum length.