from typing import Union


def _create_table_row(key: str, value: Union[str, int], highlight: bool = False) -> str:
    """
    Create table row for stats panel
    """
    template_stats_data = """
    <tr style="border-bottom: 1px solid;">
        <th style="text-align: left">{key}</th>
        <td style="text-align: left">{value}</td>
    </tr>
    """
    template_stats_data_red = """
    <tr style="color: #f00; border-bottom: 1px solid;">
        <th style="text-align: left">{key}</th>
        <td style="text-align: left">{value}</td>\
    </tr>
    """
    return (
        template_stats_data_red.format(key=key, value=value)
        if highlight
        else template_stats_data.format(key=key, value=value)
    )