code: def init_appbuilder(app: Flask) -> AirflowAppBuilder:
      """Init `Flask App Builder <https://flask-appbuilder.readthedocs.io/en/latest/>`__."""
      return AirflowAppBuilder(
          app=app,
          session=settings.Session,
          base_template="airflow/main.html",
          update_perms=conf.getboolean(
              "fab",
              "UPDATE_FAB_PERMS",
              fallback=conf.getboolean("webserver", "UPDATE_FAB_PERMS"),
          ),
          auth_rate_limited=conf.getboolean(
              "fab",
              "AUTH_RATE_LIMITED",
              fallback=conf.getboolean(
                  "webserver", "AUTH_RATE_LIMITED", fallback=True
              ),
          ),
          auth_rate_limit=conf.get(
              "fab",
              "AUTH_RATE_LIMIT",
              fallback=conf.get(
                  "webserver",
                  "AUTH_RATE_LIMIT",
                  fallback="5 per 40 second",
              ),
          ),
      )
  
imports: from __future__ import annotations
  import logging
  from functools import reduce
  from typing import TYPE_CHECKING
  from flask import Blueprint, current_app, url_for
  from flask_appbuilder import __version__
  from flask_appbuilder.babel.manager import BabelManager
  from flask_appbuilder.const import LOGMSG_ERR_FAB_ADD_PERMISSION_MENU, LOGMSG_ERR_FAB_ADD_PERMISSION_VIEW, LOGMSG_ERR_FAB_ADDON_IMPORT, LOGMSG_ERR_FAB_ADDON_PROCESS, LOGMSG_INF_FAB_ADD_VIEW, LOGMSG_INF_FAB_ADDON_ADDED, LOGMSG_WAR_FAB_VIEW_EXISTS
  from flask_appbuilder.filters import TemplateFilters
  from flask_appbuilder.menu import Menu
  from flask_appbuilder.views import IndexView, UtilView
  from airflow import settings
  from airflow.configuration import conf
  from airflow.www.extensions.init_auth_manager import get_auth_manager, init_auth_manager
label_desc: Use image node_id 2 for calling a global function with example usage: init_appbuilder(app) and returns: AirflowAppBuilder