class_docstr: A `Trimmer` that allocates a length budget to segments via round robin.
  
  A `Trimmer` that allocates a length budget to segments using a round robin
  strategy, then drops elements outside of the segment's allocated budget.
  See `generate_mask()` for more details.
class_docstr_tok: ["A","`","Trimmer","`","that","allocates","a","length","budget","to","segments","via","round","robin",".","A","`","Trimmer","`","that","allocates","a","length","budget","to","segments","using","a","round","robin","strategy",",","then","drops","elements","outside","of","the","segment","'s","allocated","budget",".","See","`","generate_mask","(",")","`","for","more","details","."]
docstr: Creates an instance of `RoundRobinTrimmer`.
  
  Args:
    max_seq_length: a scalar `Tensor` int32 that describes the number max
      number of elements allowed in a batch.
    axis: Axis to apply trimming on.
docstr_tok: ["Creates","an","instance","of","`","RoundRobinTrimmer","`",".","Args",":","max_seq_length",":","a","scalar","`","Tensor","`","int32","that","describes","the","number","max","number","of","elements","allowed","in","a","batch",".","axis",":","Axis","to","apply","trimming","on","."]
code: def __init__(self, max_seq_length, axis=-1):
      """Creates an instance of `RoundRobinTrimmer`.
  
      Args:
        max_seq_length: a scalar `Tensor` int32 that describes the number max
          number of elements allowed in a batch.
        axis: Axis to apply trimming on.
      """
      if (
          isinstance(max_seq_length, tensor.Tensor)
          and max_seq_length.shape.ndims > 0
      ):
          self._max_seq_length = array_ops.reshape(max_seq_length, ())
      else:
          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 RoundRobinTrimmer object from inherited base classes: Trimmer with example: obj = RoundRobinTrimmer(max_seq_length, axis)