code: def init_api_internal(
      app: Flask, standalone_api: bool = False
  ) -> None:
      """Initialize Internal API."""
      if not standalone_api and not conf.getboolean(
          "webserver", "run_internal_api", fallback=False
      ):
          return
  
      base_paths.append("/internal_api/v1")
      with ROOT_APP_DIR.joinpath(
          "api_internal", "openapi", "internal_api_v1.yaml"
      ).open() as f:
          specification = safe_load(f)
      api_bp = FlaskApi(
          specification=specification,
          base_path="/internal_api/v1",
          options={
              "swagger_ui": conf.getboolean(
                  "webserver", "enable_swagger_ui", fallback=True
              )
          },
          strict_validation=True,
          validate_responses=True,
      ).blueprint
      api_bp.after_request(set_cors_headers_on_response)
  
      app.register_blueprint(api_bp)
      app.after_request_funcs.setdefault(api_bp.name, []).append(
          set_cors_headers_on_response
      )
      app.extensions["csrf"].exempt(api_bp)
  
imports: from __future__ import annotations
  import logging
  import os
  import warnings
  from functools import cached_property
  from pathlib import Path
  from typing import TYPE_CHECKING
  from connexion import FlaskApi, ProblemException, Resolver
  from connexion.decorators.validation import RequestBodyValidator
  from connexion.exceptions import BadRequestProblem
  from flask import request
  from airflow.api_connexion.exceptions import common_error_handler
  from airflow.configuration import conf
  from airflow.exceptions import RemovedInAirflow3Warning
  from airflow.security import permissions
  from airflow.utils.yaml import safe_load
  from airflow.www.extensions.init_auth_manager import get_auth_manager
label_desc: Use image node_id 8 for calling a global function with example usage: init_api_internal(app, standalone_api) without return types