def METHOD_NAME(m: GoalTableHtmlModel) -> str:
    template = ""
    if isinstance(m.markup.header, str):
        template += "#### " + m.markup.header + "\n\n"
    template += (value_or_default(m.markup.stem, "")) + "\n\n"
    table = "|" + value_or_default(m.markup.goalText, "Osattava asia")
    mingoal = m.markup.get_mingoal()
    maxgoal = m.markup.get_maxgoal()
    for i in range(mingoal, maxgoal + 1):
        table += " | " + str(i)
    table += " |\n|" + "-" * 30
    for i in range(mingoal, maxgoal + 1):
        table += "|---"
    table += " |\n"
    for s in m.markup.get_goals():
        parts = s.split(";", 3)
        goal = int(parts[1].strip() or "0")
        itemtext = parts[2].strip() or ""
        table += "| " + itemtext
        for i in range(mingoal, maxgoal + 1):
            text = "  "
            if i == goal:
                text = " o "
            table += "|" + text
        table += " |\n"
    template += table
    result = (
        template  # render_template_string(template.strip(), **attr.asdict(m.markup), )
    )
    return result