code: def _wordpiece(
      token, vocab, unk_token, prefix="##", sentencepiece_prefix=""
  ):
      """wordpiece: helloworld => [hello, ##world]"""
      chars = list(token)
      if len(chars) > _max_input_chars_per_word:
          return [unk_token], [(0, len(chars))]
  
      is_bad = False
      start = 0
      sub_tokens = []
      sub_pos = []
      while start < len(chars):
          end = len(chars)
          cur_substr = None
          while start < end:
              substr = "".join(chars[start:end])
              if start == 0:
                  substr = sentencepiece_prefix + substr
              if start > 0:
                  substr = prefix + substr
              if substr in vocab:
                  cur_substr = substr
                  break
              end -= 1
          if cur_substr is None:
              is_bad = True
              break
          sub_tokens.append(cur_substr)
          sub_pos.append((start, end))
          start = end
      if is_bad:
          return [unk_token], [(0, len(chars))]
      else:
          return sub_tokens, sub_pos
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import logging
  import os
  import re
  import sys
  import tempfile
  from functools import partial
  from pathlib import Path
  import six
  from tqdm import tqdm
  import numpy
  from disco_diffusion_ernievil_base.vit_b_16x.ernievil2.transformers.file_utils import _fetch_from_remote
  import io
label_desc: Use image node_id 1 for calling a global function with example usage: _wordpiece(token, vocab, unk_token, prefix, sentencepiece_prefix) and returns: list,  list, list,  list, sub_tokens,  sub_pos