code: def transformExpected(self, expected, is_offsets=False):
      bos = _utf8("<s>")
      eos = _utf8("</s>")
      if is_offsets:
          bos = 0
          eos = 0
      elif self.out_type == dtypes.int32:
          bos = 1
          eos = 2
      if not isinstance(expected[0], list):
          if self.add_bos:
              expected = [bos] + expected
          if self.add_eos:
              expected = expected + [eos]
          if self.reverse:
              expected = [x for x in reversed(expected)]
      else:
          return [self.transformExpected(x) for x in expected]
      return expected
  
imports: import sys
  import tempfile
  from absl.testing import parameterized
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.framework import test_util
  from tensorflow.python.lib.io import file_io
  from tensorflow.python.module import module
  from tensorflow.python.ops import gen_experimental_dataset_ops
  from tensorflow.python.ops.ragged import ragged_factory_ops
  from tensorflow.python.ops.ragged import ragged_gather_ops
  from tensorflow.python.platform import gfile
  from tensorflow.python.platform import test
  from tensorflow.python.saved_model import load
  from tensorflow.python.saved_model import save
  from tensorflow_text.python.ops.sentencepiece_tokenizer import SentencepieceTokenizer
label_desc: Use image node_id 2 for calling the SentencepieceTokenizerOpTest obj's underlying member method code with example usage: obj.transformExpected(expected, is_offsets) and returns: expected, unknown