def process_docstring(app, what, name, obj, options, lines):
    """
    Process the docstring for a given python object.
    Note that the list 'lines' is changed in this function. Sphinx
    uses the altered content of the list.
    """
    result = [re.sub(r'U\{([^}]*)\}', r'\1',
                     re.sub(r'(L|C)\{([^}]*)\}', r':py:obj:`\2`',
                            re.sub(r'@(' + '|'.join(FIELDS) + r')', r':\1',
                                   l)))
              for l in lines]
    lines[:] = result[:]
Process the docstring for a given python object.
    Note that the list 'lines' is changed in this function. Sphinx
    uses the altered content of the list.