def METHOD_NAME(self, tw: TerminalWriter) -> None:
    """Print out a custom error message to the terminal"""
    # Try to get the stage so we can print it out. I'm not sure if the stage
    # will ever NOT be present, but better to check just in case
    try:
        stage = self.exce._excinfo[1].stage
    except AttributeError:
        stage = None
        # Fallback, we don't know which stage it is
        stages = self.item.spec["stages"]
        first_line = start_mark(stages[0]).line - 1
        last_line = end_mark(stages[-1]).line
        line_start = None
    else:
        first_line, last_line, line_start = get_stage_lines(stage)
    code_lines = list(read_relevant_lines(self.item.spec, first_line, last_line))
    missing_format_vars = self._print_format_variables(tw, code_lines)
    tw.line("")
    self._print_test_stage(tw, code_lines, missing_format_vars, line_start)
    tw.line("")
    if not stage:
        tw.line(
            "[Could not determine which stage was running]", red=True, bold=True
        )
    elif missing_format_vars:
        tw.line("Missing format vars for stage", red=True, bold=True)
    else:
        self._print_formatted_stage(tw, stage)
    tw.line("")
    self._print_errors(tw)