class_docstr: Flip every pair of tokens: 1 2 3 4 -> 2 1 4 3.
    
class_docstr_tok: ["Flip","every","pair","of","tokens",":","1","2","3","4","-",">","2","1","4","3","."]
docstr: Only generate sequences with even lengths.
  
  Args:
    dataset_split: A problem.DatasetSplit specifying which dataset the
      sequence is a part of.
  
  Returns:
    An even number >= min_sequence_length(dataset_split)
      and <= max_sequence_length(dataset_split)
docstr_tok: ["Only","generate","sequences","with","even","lengths",".","Args",":","dataset_split",":","A","problem.DatasetSplit","specifying","which","dataset","the","sequence","is","a","part","of",".","Returns",":","An","even","number",">","=","min_sequence_length","(","dataset_split",")","and","<","=","max_sequence_length","(","dataset_split",")"]
code: def sequence_length(self, dataset_split):
      """Only generate sequences with even lengths.
  
      Args:
        dataset_split: A problem.DatasetSplit specifying which dataset the
          sequence is a part of.
  
      Returns:
        An even number >= min_sequence_length(dataset_split)
          and <= max_sequence_length(dataset_split)
      """
      min_length = self.min_sequence_length(dataset_split)
      min_length += min_length % 2
      max_length = self.max_sequence_length(dataset_split)
      max_length -= max_length % 2
      length = random.randint(min_length, max_length)
      return length - (length % 2)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import random
  from six.moves import range
  from tensor2tensor.data_generators import problem
  from tensor2tensor.data_generators import text_encoder
  from tensor2tensor.data_generators import text_problems
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
label_desc: Use image node_id 1 for calling the FlipBiGramSequence obj's underlying member method code with example usage: obj.sequence_length(dataset_split) and returns: unknown