from typing import Optional
import click


def style_output(
    msg: str, fg: Optional[str] = None, bg: Optional[str] = None, bold: bool = False
) -> str:
    """
    A thin wrapper around click.style.

    See https://click.palletsprojects.com/en/8.0.x/api/?highlight=style#click.style
    """
    s: str = click.style(msg, fg=fg, bg=bg, bold=bold)
    return s