def METHOD_NAME(category: Category | None) -> str:
    entries = entries_by_category.get(category, [])
    heading = category.heading() if category else "Uncategorized"
    lines = "\n\n".join(entries)
    if not entries:
        return ""
    return f"## {heading}\n\n{lines}"