Scheduler/Webserver should never use Internal API, so calling any method decorated with internal_api_call should still execute them locally
#
#
from __future__ import annotations
import inspect
import json
from functools import wraps
from typing import Callable, TypeVar
import requests
from airflow.configuration import conf
from airflow.exceptions import AirflowConfigException, AirflowException
from airflow.typing_compat import ParamSpec
PS = ParamSpec("PS")
RT = TypeVar("RT")
class InternalApiConfig:
    """Stores and caches configuration for Internal API."""
    _initialized = False
    _use_internal_api = False
    _internal_api_endpoint = ""
    @staticmethod
    def get_use_internal_api():
        if not InternalApiConfig._initialized:
            InternalApiConfig._init_values()
        return InternalApiConfig._use_internal_api
    @staticmethod
    def get_internal_api_endpoint():