class_docstr: A text dataset with one sequence as input and a label.
class_docstr_tok: ["A","text","dataset","with","one","sequence","as","input","and","a","label","."]
docstr: Returns the length of the example for the purpose of the bucketing.
docstr_tok: ["Returns","the","length","of","the","example","for","the","purpose","of","the","bucketing","."]
code: def example_length_fn(self, example: Example) -> tf.Tensor:
      """Returns the length of the example for the purpose of the bucketing."""
      return tf.size(example["token_ids"])
  
imports: from typing import Any, Dict, Optional
  from absl import logging
  import numpy
  import tensorflow
  import tensorflow_datasets
  import tensorflow_text
  import vocabulary
label_desc: Use image node_id 3 for calling the TextDataset obj's underlying member method code with example usage: obj.example_length_fn(example) and returns: tf