def format_error(string: str, is_warning: bool) -> str:
    """
    Formats a given message in an error color using ANSI escape sequences
    (see https://stackoverflow.com/a/287944/5299750
    and https://stackoverflow.com/a/33206814/5299750)
    :param string: to be printed
    :param is_warning: determines the color of the error
    """
    if is_warning:
        ansi_start = '\033[93m'
    else:
        ansi_start = '\033[91m'
    ansi_end = '\033[0m'
    return f"{ansi_start}{string}{ansi_end}"