code: def preprocess_gigast_text(text: str) -> str:
      invalid = [
          "<--plhd--8/>",
          "<i>",
          "</i>",
          "</I>",
          "</u>",
      ]
      for t in invalid:
          text = text.replace(t, "")
  
      text = text.strip("<>")  # remove < or > from beginning and end
      text = " ".join(text.split())
  
      assert "<" not in text and ">" not in text, text
      return text
  
imports: import argparse
  import copy
  import json
label_desc: Use image node_id 2 for calling a global function with example usage: preprocess_gigast_text(text) and returns: text