class_docstr: A pretrained model implementation for Grapheme-to-Phoneme (G2P) models
  that take raw natural language text as an input and
  
  Example
  -------
  >>> text = ("English is tough. It can be understood "
  ...         "through thorough thought though")
  >>> from speechbrain.inference.text import GraphemeToPhoneme
  >>> tmpdir = getfixture('tmpdir')
  >>> g2p = GraphemeToPhoneme.from_hparams('path/to/model', savedir=tmpdir) # doctest: +SKIP
  >>> phonemes = g2p.g2p(text) # doctest: +SKIP
code: def _update_graphemes(self, model_inputs):
      grapheme_sequence_mode = getattr(
          self.hparams, "grapheme_sequence_mode"
      )
      if grapheme_sequence_mode and grapheme_sequence_mode != "raw":
          grapheme_encoded_key = (
              f"grapheme_encoded_{grapheme_sequence_mode}"
          )
          if grapheme_encoded_key in model_inputs:
              model_inputs["grapheme_encoded"] = model_inputs[
                  grapheme_encoded_key
              ]
  
imports: import torch
  from itertools import chain
  from speechbrain.inference.interfaces import Pretrained, EncodeDecodePipelineMixin
label_desc: Use image node_id 5 for calling the GraphemeToPhoneme obj's underlying member method code with example usage: obj._update_graphemes(model_inputs) without return types