class_docstr: A `Trimmer` that truncates the longest segment.
  
  A `Trimmer` that allocates a length budget to segments by shrinking whatever
  is the longest segment at each round at the end, until the total length of
  segments is no larger than the allocated budget.
  See `generate_mask()` for more details.
class_docstr_tok: ["A","`","Trimmer","`","that","truncates","the","longest","segment",".","A","`","Trimmer","`","that","allocates","a","length","budget","to","segments","by","shrinking","whatever","is","the","longest","segment","at","each","round","at","the","end",",","until","the","total","length","of","segments","is","no","larger","than","the","allocated","budget",".","See","`","generate_mask","(",")","`","for","more","details","."]
code: def __init__(self, max_seq_length, axis=-1):
      self._max_seq_length = max_seq_length
      self._axis = axis
  
imports: import abc
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops.ragged import ragged_array_ops
  from tensorflow.python.ops.ragged import ragged_tensor
  from tensorflow_text.python.ops import item_selector_ops
  from tensorflow.python.framework import load_library
  from tensorflow.python.platform import resource_loader
  from tensorflow.python.ops import while_loop
label_desc: Use image node_id 1 to create a new ShrinkLongestTrimmer object from inherited base classes: Trimmer with example: obj = ShrinkLongestTrimmer(max_seq_length, axis)