def _fix_missing_period(line):
    """
    Adds a period to a line that is missing a period.
    """
    dm_single_close_quote = u'\u2019'
    dm_double_close_quote = u'\u201d'
    END_TOKENS = [
        '.',
        '!',
        '?',
        '...',
        "'",
        "`",
        '"',
        dm_single_close_quote,
        dm_double_close_quote,
        ")",
    ]  # acceptable ways to end a sentence
    if "@highlight" in line or line == "" or line[-1] in END_TOKENS:
        return line
    return line + "."