def METHOD_NAME(s: str, color: str, bold: bool = False) -> str:
    """
    Returns the string s surrounded by shell metacharacters to display
    it with the given color and optionally bolded.
    """
    # List of shell colors from https://www.siafoo.net/snippet/88
    shell_colors = {
        "gray": "30",
        "red": "31",
        "green": "32",
        "yellow": "33",
        "blue": "34",
        "magenta": "35",
        "cyan": "36",
        "white": "37",
        "crimson": "38",
        "highlighted_red": "41",
        "highlighted_green": "42",
        "highlighted_brown": "43",
        "highlighted_blue": "44",
        "highlighted_magenta": "45",
        "highlighted_cyan": "46",
        "highlighted_gray": "47",
        "highlighted_crimson": "48",
    }
    # Based on http://stackoverflow.com/a/2330297/1093000
    attrs = []
    attrs.append(shell_colors[color])
    if bold:
        attrs.append("1")
    return "\x1b[{}m{}\x1b[0m".format(";".join(attrs), s)