code: def warn(file, line_number, message, type=None):
      global total_errors
      text = ""
      if type:
          text = f"[{type}] "
      text += basename(file) + ":" + str(line_number)
      if total_errors < MAX_SHOW_ERRORS:
          print(colored(text, "red"), colored(message, "red"))
  
      total_errors += 1
  
imports: import yaml
  from os.path import join, basename, dirname
  import joblib
  from termcolor import colored
label_desc: Use image node_id 1 for calling a global function with example usage: warn(file, line_number, message, type) without return types