def METHOD_NAME(app, directive, no_index, no_index_entry, sig_f, sig_g, index_g):
    text = (f'.. {directive}:: {sig_f}\n'
            f'   :no-typesetting:\n'
            f'.. {directive}:: {sig_g}\n'
            f'   :no-typesetting:\n'
            f'.. code::\n'
            f'\n'
            f'   code\n')
    doctree = restructuredtext.parse(app, text)
    # Note that all index nodes come before the targets
    assert_node(doctree, (addnodes.index, addnodes.index, nodes.target, nodes.target, nodes.literal_block))