def METHOD_NAME(warnings: Iterable[Warning]) -> List[str]:
    """Format the list of warnings into lines of markdown."""
    whens: Dict[str, List[Warning]] = {}
    for warning in warnings:
        try:
            whens[warning.when].append(warning)
        except KeyError:
            whens[warning.when] = [warning]
    lines = []
    for when, warns in whens.items():
        lines.append(f"#### On {when}\n")
        for warn in warns:
            lines.append(f"- `{warn}`")
        lines.append("")
    return lines[:-1]  # we do not need a trailing new line