code: def error(message: str) -> None:
      time_stamp = get_curr_time_stamp()
      error_str = (
          text_colors["error"]
          + text_colors["bold"]
          + "ERROR  "
          + text_colors["end_color"]
      )
  
      # exiting with code -1 does not tell any information about the error (e.g., NaN encountered in the loss).
      # For more descriptive error messages, we replace exit(-1) with sys.exit(ERROR_MESSAGE).
      # This allows us to handle specific exceptions in the tests.
  
      # print("{} - {} - {}".format(time_stamp, error_str, message), flush=True)
      # print("{} - {} - {}".format(time_stamp, error_str, "Exiting!!!"), flush=True)
      # exit(-1)
  
      if sys.exc_info()[0] is None:
          traceback.print_stack()
      else:
          traceback.print_exc()
      sys.exit(
          "{} - {} - {}. Exiting!!!".format(
              time_stamp, error_str, message
          )
      )
  
file_path: ml-cvnets/utils/logger.py
imports: import os
  import sys
  import time
  import traceback
  from typing import Optional, Union
label_desc: Use image node_id 2 for calling a global function with example usage: error(message) without return types