def align_caret(line: str, col: int) -> str:
    """
    Return the whitespace necessary to align a caret to underline the desired column in
    the line of text. Mainly this means handling tabs.
    """
    return "".join("\t" if c == "\t" else " " for c in line[: col - 1])