code: def remove_non_printing_char(text):
      """
      Port of https://github.com/moses-smt/mosesdecoder/blob/master/scripts/tokenizer/remove-non-printing-char.perl
      """
      output = []
      for char in text:
          cat = unicodedata.category(char)
          if cat.startswith("C"):
              continue
          output.append(char)
      return "".join(output)
  
imports: import json
  import os
  import re
  import sys
  import unicodedata
  from typing import List, Optional, Tuple
  from ...tokenization_utils import PreTrainedTokenizer
  from ...utils import logging
label_desc: Use image node_id 4 for calling a global function with example usage: remove_non_printing_char(text) and returns: str