def METHOD_NAME(builder, docname, **kwargs):
    """Build the toctree relative to the named document,
    with the given parameters, and then return the rendered
    HTML fragment.
    """
    fulltoc = get_toctree_for(builder,
                              docname,
                              **kwargs
                              )
    rendered_toc = builder.render_partial(fulltoc)['fragment']
    return rendered_toc