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: Prepends BOS ID and appends EOS ID to a sequence of token IDs.
docstr_tok: ["Prepends","BOS","ID","and","appends","EOS","ID","to","a","sequence","of","token","IDs","."]
code: def add_bos_eos(self, sequence: tf.Tensor) -> tf.Tensor:
      """Prepends BOS ID and appends EOS ID to a sequence of token IDs."""
      return tf.concat(
          [[self.vocab.bos_idx], sequence, [self.vocab.eos_idx]], 0
      )
  
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 4 for calling the TextDataset obj's underlying member method code with example usage: obj.add_bos_eos(sequence) and returns: tf