def METHOD_NAME(self, context):
    request = context['request']
    couch_user = getattr(request, 'couch_user', None)
    project = getattr(request, 'project', None)
    domain = context.get('domain')
    all_tabs = get_all_tabs(request, domain=domain, couch_user=couch_user,
                            project=project)
    active_tab = _get_active_tab(all_tabs, request.get_full_path())
    if active_tab:
        active_tab.is_active_tab = True
    visible_tabs = [tab for tab in all_tabs if tab.should_show()]
    # set the context variable in the highest scope so it can be used in
    # other blocks
    role_version = None
    try:
        if couch_user:
            user_role = couch_user.get_role(domain, allow_enterprise=True)
            role_version = user_role.cache_version if user_role else None
    except DomainMembershipError:
        role_version = None
    lang = get_language()
    from corehq.apps.hqwebapp.utils.bootstrap import get_bootstrap_version, BOOTSTRAP_5
    bootstrap_version = get_bootstrap_version()
    use_bootstrap5 = bootstrap_version == BOOTSTRAP_5
    for tab in visible_tabs:
        tab.frag_value = UITab.create_compound_cache_param(
            tab.class_name(),
            domain,
            couch_user._id,
            role_version,
            tab.is_active_tab,
            lang,
            use_bootstrap5
        )
    context.dicts[0]['active_tab'] = active_tab
    flat = context.flatten()
    flat.update({
        'tabs': visible_tabs,
        'role_version': role_version,
        'use_bootstrap5': use_bootstrap5,
    })
    return render_to_string(f"tabs/{bootstrap_version}/menu_main.html", flat)