def __init__(
        self, api_client: ApiClient, execution_mode: str = "sandbox", **kwargs: Any
    ) -> None:
        """
        Initialize the UnitycatalogFunctionClient.

        Args:
            api_client: An instance of unitycatalog.client.ApiClient that has been constructed with the desired Configuration.
            execution_mode: Set the function execution mode of the client. Options are:
                - "local": Execute functions directly in the local Python main process. This mode is not recommended for
                    production use as it may lead to unwanted side effects, potential security issues,
                    and has no protection against excessive resource usage.
                - "sandbox": (Default) Execute functions in a sandboxed subprocess using multiprocessing. This mode is preferred
                    for production use as it provides a controlled environment for function execution. Note that there
                    are restrictions on core library use in Python as well as a block on interfacing with the local filesystem
                    via standard Python APIs. If your functions require access to the local filesystem, consider using the
                    "local" execution mode.
            **kwargs: Additional keyword arguments.
        """

        if not isinstance(api_client, ApiClient):
            raise ValueError(
                "The 'api_client' must be an instance of unitycatalog.client.ApiClient"
            )

        self.uc = UnitycatalogClient(api_client)
        self.execution_mode = ExecutionMode.validate(execution_mode)
        self.func_cache = {}
        super().__init__()

        # Clean up the ApiClient instance for aiohttp to ensure that we're not leaking resources
        # and preventing Python's GC operation as well as to ensure that multiple instances of
        # this client are not present within a thread (eliminate a potential memory leak).
        atexit.register(self.close)

        Initialize the UnitycatalogFunctionClient.

        Args:
            api_client: An instance of unitycatalog.client.ApiClient that has been constructed with the desired Configuration.
            execution_mode: Set the function execution mode of the client. Options are:
                - "local": Execute functions directly in the local Python main process. This mode is not recommended for
                    production use as it may lead to unwanted side effects, potential security issues,
                    and has no protection against excessive resource usage.
                - "sandbox": (Default) Execute functions in a sandboxed subprocess using multiprocessing. This mode is preferred
                    for production use as it provides a controlled environment for function execution. Note that there
                    are restrictions on core library use in Python as well as a block on interfacing with the local filesystem
                    via standard Python APIs. If your functions require access to the local filesystem, consider using the
                    "local" execution mode.
            **kwargs: Additional keyword arguments.
        
ai/core/src/unitycatalog/ai/core/client.py