from typing import Dict
from typing import Any


def _format_order_item(item: Dict[str, Any]) -> str:
    """Return ORDER BY item with sort direction."""
    if "sort" in item:
        return f"{item['value']} {item['sort'].lower()}"
    return f"{item['value']}"