code: def warn(
      message,
      level=1,
      file=None,
      line_number=None,
      error_type=None,
      sent_id=None,
      node_number=None,
  ):
      global error_count
      global MAX_ERROR
      error_count += 1
      if error_count >= MAX_ERROR:
          print("MAX_ERROR_EXCEEDED. Stop")
          print(f"*** FAILED *** with {error_count} errors")
          sys.exit(1)
  
      text = ""
      if file:
          text += f"[(in {file})"
      if line_number:
          text += f" Line {line_number}"
      if sent_id:
          text += f" Sent {sent_id}"
      text += "]: "
      text += f"[L{level}"
      if error_type:
          text += f" {error_type}"
      text += "] "
      text += message
      print(text)
  
file_path: underthesea/underthesea/corpus/validate_corpus.py
imports: import sys
  from os import listdir
  from os.path import join, basename
  import charset_normalizer
  from underthesea.feature_engineering.text import Text
  from underthesea.file_utils import DATASETS_FOLDER
  from underthesea.pipeline.word_tokenize import tokenize
label_desc: Use image node_id 1 for calling a global function with example usage: warn(message, level, file, line_number, error_type, sent_id, node_number) without return types