code: def strip_BPE_artifacts(token, model_type):
      """Strip characters such as "Ġ" that are left over from BPE tokenization.
  
      Args:
          token (str)
          model_type (str): type of model (options: "bert", "roberta", "xlnet")
      """
      avail_models = [
          "bert",
          "gpt",
          "gpt2",
          "roberta",
          "bart",
          "electra",
          "longformer",
          "xlnet",
      ]
      if model_type not in avail_models:
          raise ValueError(
              f"Model type {model_type} is not available. Options are {avail_models}."
          )
      if model_type in ["bert", "electra"]:
          return token.replace("##", "")
      elif model_type in [
          "gpt",
          "gpt2",
          "roberta",
          "bart",
          "longformer",
      ]:
          return token.replace("Ġ", "")
      elif model_type == "xlnet":
          if len(token) > 1 and token[0] == "_":
              return token[1:]
          else:
              return token
      else:
          return token
  
imports: import re
  import string
  import flair
  import jieba
  from .importing import LazyLoader
label_desc: Use image node_id 14 for calling a global function with example usage: strip_BPE_artifacts(token, model_type) and returns: token, token, token, token, token