code: def remove_newline_and_detokenize(x, detokenizer):
      x = re.sub(r"\\n+", " ", x)
      x = re.sub(r"\n+", " ", x)
      x = re.sub(r"\\r+", " ", x)
      x = re.sub(r"\r+", " ", x)
      x = x.strip()
      x = detokenizer.detokenize([x])
      return x
  
file_path: NeMo/scripts/nlp_language_modeling/niv2/preprocess_niv2.py
imports: import json
  import os
  import re
  from argparse import ArgumentParser
  from multiprocessing import Pool
  from sacremoses import MosesDetokenizer
  from nemo.collections.common.tokenizers import AutoTokenizer
label_desc: Use image node_id 1 for calling a global function with example usage: remove_newline_and_detokenize(x, detokenizer) and returns: x