code: def testTokenizeAndDetokenizeWithOffsetsScalar(
      self, reverse, add_bos, add_eos, out_type
  ):
      add_eos = False  # b/260620045
      sp = self.getTokenizerAndSetOptions(
          reverse, add_bos, add_eos, out_type
      )
      sentence = "I love lamp."
      expected_tok = []
      expected_starts = [0, 1, 3, 4, 6, 8, 11]
      expected_ends = [1, 3, 4, 6, 8, 11, 12]
      if out_type == dtypes.int32:
          expected_tok = [9, 169, 21, 125, 169, 579, 6]
      else:
          expected_tok = _utf8(
              ["▁I", "▁l", "o", "ve", "▁l", "amp", "."]
          )
      expected_tok = self.transformExpected(expected_tok)
      expected_starts = self.transformExpected(expected_starts, True)
      expected_ends = self.transformExpected(expected_ends, True)
      (tokens, starts, ends) = sp.tokenize_with_offsets(
          ragged_factory_ops.constant(sentence)
      )
      self.assertAllEqual(expected_tok, tokens)
      self.assertAllEqual(expected_starts, starts)
      self.assertAllEqual(expected_ends, ends)
      detokenized = sp.detokenize(tokens)
      self.assertAllEqual(_utf8(sentence), detokenized)
  
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 15 for calling the SentencepieceTokenizerOpTest obj's underlying member method code with example usage: obj.testTokenizeAndDetokenizeWithOffsetsScalar(reverse, add_bos, add_eos, out_type) without return types