code: def remove_repeated_noise(text, pattern="<noise>"):
      """remove repeated <noise>"""
  
      if len(re.findall(pattern, text)) <= 1:
          return text
  
      out_text = ""
      text_split = text.split()
      out_text = [text_split[0]]
      for i in range(1, len(text_split)):
          if text_split[i] == pattern and text_split[i - 1] == pattern:
              continue
          else:
              out_text.append(text_split[i])
  
      return " ".join(out_text)
  
imports: import argparse
  import collections
  import itertools
  import os
  import random
  import re
  import sys
label_desc: Use image node_id 8 for calling a global function with example usage: remove_repeated_noise(text, pattern) and returns: str, text