code: def hf_decode(model, tokens):
      is_multiple_sentences = is_tokens_from_multiple_sentences(tokens)
      if not is_multiple_sentences:
          tokens = [tokens]
      token_type = get_token_type(tokens)
      if token_type is str:
          id_tokens = [
              [model.token_to_id(token) for token in sentence]
              for sentence in tokens
          ]
          ret = model.decode_batch(id_tokens)
      elif token_type is int:
          ret = model.decode_batch(tokens)
      else:
          raise TokenTypeNotSupportedError(token_type)
      if is_multiple_sentences:
          return ret
      else:
          return ret[0]
  
imports: import os
  import json
  from pkg_resources import parse_version
  from typing import Optional, Union, List, Tuple
  from collections import OrderedDict
  from uuid import uuid4
  from .base import *
  from ..vocab import Vocab, load_vocab
  from ...utils.lazy_imports import try_import_huggingface_tokenizers
label_desc: Use image node_id 4 for calling a global function with example usage: hf_decode(model, tokens) and returns: ret, ret