def admin_tools_render_menu_item(context, item, index=None):
    """
    Template tag that renders a given menu item, it takes a ``MenuItem``
    instance as unique parameter.
    """
    item.init_with_context(context)

    context.update({
        'template': item.template,
        'item': item,
        'index': index,
        'selected': item.is_selected(context['request']),
        'admin_url': reverse('%s:index' % get_admin_site_name(context)),
    })
    return context
dataset/ETHPy150Open django-admin-tools/django-admin-tools/admin_tools/menu/templatetags/admin_tools_menu_tags.py/admin_tools_render_menu_item/original