async def execute_function_async(
        self,
        function_name: str,
        parameters: Optional[dict[str, Any]] = None,
        **kwargs: Any,
    ) -> FunctionExecutionResult:
        """
        Execute a function in Unity Catalog asynchronously.

        Args:
            function_name: The name of the function to execute in the form of `<catalog>.<schema>.<function name>`.
            parameters: Optional dictionary of parameters to pass to the function.
            **kwargs: Additional keyword arguments.
        """
        with self._lock:
            function_info = self.get_function(function_name, **kwargs)
        parameters = parameters or {}
        self.validate_input_params(function_info.input_params, parameters)

        func, parameters = self._prepare_function_and_params(function_info, parameters)
        if self.execution_mode == ExecutionMode.LOCAL:
            try:
                if asyncio.iscoroutinefunction(func):
                    result = await func(**parameters)
                else:
                    loop = asyncio.get_running_loop()
                    result = await loop.run_in_executor(None, partial(func, **parameters))
            except Exception as e:
                return FunctionExecutionResult(error=str(e))
        elif self.execution_mode == ExecutionMode.SANDBOX:
            succeeded, result = await run_in_sandbox_async(func, parameters)
            if not succeeded:
                return FunctionExecutionResult(error=result)
        else:
            raise NotImplementedError(
                f"Execution mode {self.execution_mode} is not supported for function execution."
            )
        if not result:
            result = NO_OUTPUT_MESSAGE
        return FunctionExecutionResult(format="SCALAR", value=result)

        Execute a function in Unity Catalog asynchronously.

        Args:
            function_name: The name of the function to execute in the form of `<catalog>.<schema>.<function name>`.
            parameters: Optional dictionary of parameters to pass to the function.
            **kwargs: Additional keyword arguments.
        
ai/core/src/unitycatalog/ai/core/client.py