def _valid_char_in_line(char: bytes, line: bytes) -> bool:
    """Return True if a char appears in the line and is not commented."""
    comment_index = line.find(b"#")
    char_index = line.find(char)
    valid_char_in_line = char_index >= 0 and (
        comment_index > char_index or comment_index < 0
    )
    return valid_char_in_line