def fix_trailing_underscore(word):
    """ Replace the trailing ``_`` with ``\\_`` so that it will printed
    properly in the documentation.

    """
    if word.endswith('_'):
        word = word.replace('_', '\\_')
    return word
