docstr: Given the model and a list of tokens, outputs the corresponding text.
  
  For models using the GPT-2 tokenizer, the tokens are integers; for AI21
  models, the tokens are `TokenizationToken`s.
  
  Some tokenizers (e.g. AI21) normalize the text before encoding it and
  thus require the `normalized_text` for decoding.
docstr_tok: ["Given","the","model","and","a","list","of","tokens",",","outputs","the","corresponding","text",".","For","models","using","the","GPT-2","tokenizer",",","the","tokens","are","integers",";","for","AI21","models",",","the","tokens","are","`","TokenizationToken","`","s",".","Some","tokenizers","(","e.g",".","AI21",")","normalize","the","text","before","encoding","it","and","thus","require","the","`","normalized_text","`","for","decoding","."]
code: def decode(
      self,
      tokens: List[TokenizationToken],
      normalized_text: Optional[str] = None,
  ) -> str:
      """
      Given the model and a list of tokens, outputs the corresponding text.
  
      For models using the GPT-2 tokenizer, the tokens are integers; for AI21
      models, the tokens are `TokenizationToken`s.
  
      Some tokenizers (e.g. AI21) normalize the text before encoding it and
      thus require the `normalized_text` for decoding.
      """
      # For Hugging Face tokenizers, should set `clean_up_tokenization_spaces` to False
      # (https://github.com/huggingface/transformers/issues/17682).
      # If we don't, something like "their 'studio'" becomes "their'studio'" when decoding.
      response: DecodeRequestResult = self.service.decode(
          DecodeRequest(
              [token.value for token in tokens],  # type: ignore
              tokenizer=self.tokenizer_name,
              clean_up_tokenization_spaces=False,
          )
      )
      return response.text
  
file_path: H2O/h2o_hf/helm/src/helm/benchmark/window_services/local_window_service.py
imports: from typing import List, Optional, cast
  from .window_service import WindowService, EncodeResult
  from .tokenizer_service import TokenizerService
  from helm.common.tokenization_request import DecodeRequest, DecodeRequestResult, TokenizationRequest, TokenizationRequestResult, TokenizationToken
label_desc: Use image node_id 3 for calling the LocalWindowService obj's underlying member method code with example usage: obj.decode(tokens, normalized_text) and returns: response