code: def clean_pipeline(txt, graphemes):
      """
      Cleans incoming text, removing any characters not on the
      accepted list of graphemes and converting to uppercase
  
      Arguments
      ---------
      txt: str
          the text to clean up
      graphemes: list
          a list of graphemes
  
      Returns
      -------
      item: DynamicItem
          A wrapped transformation function
      """
      result = txt.upper()
      result = "".join(char for char in result if char in graphemes)
      result = RE_MULTI_SPACE.sub(" ", result)
      return result
  
imports: from functools import reduce
  from speechbrain.wordemb.util import expand_to_chars
  import speechbrain
  import torch
  import re
label_desc: Use image node_id 1 for calling a global function with example usage: clean_pipeline(txt, graphemes) and returns: result