code: def _GetTokensFromWordpieceOffsets(
      tokens, begin_indices, end_indices
  ):
      begin_indices = begin_indices.to_list()
      end_indices = end_indices.to_list()
      result = []
      for docs_idx in range(0, len(tokens)):
          tokens_in_doc = []
          for tokens_idx in range(0, len(tokens[docs_idx])):
              token = bytes(tokens[docs_idx][tokens_idx])
              begin_offsets = begin_indices[docs_idx][tokens_idx]
              end_offsets = end_indices[docs_idx][tokens_idx]
              tokens_in_doc.append(
                  b"".join(
                      [
                          token[begin:end]
                          for begin, end in zip(
                              begin_offsets, end_offsets
                          )
                      ]
                  )
              )
          result.append(tokens_in_doc)
      return result
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  from tensorflow.python.compat import compat
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import lookup_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops.ragged import ragged_factory_ops
  from tensorflow.python.platform import test
  from tensorflow_text.python.ops.wordpiece_tokenizer import WordpieceTokenizer
label_desc: Use image node_id 3 for calling a global function with example usage: _GetTokensFromWordpieceOffsets(tokens, begin_indices, end_indices) and returns: result