def process_function_names(
    function_names: List[str],
    tools_dict: Dict[str, Any],
    client,
    uc_function_to_tool_func: Callable,
    **kwargs,
) -> Dict[str, Any]:
    """
    Process function names and update the tools dictionary.
    Iterates over the provided function names, converts them into tool instances
    using the provided conversion function, and updates the `tools_dict`.
    Handles wildcard function names (e.g., function name ending with '*') by
    listing all functions in the specified catalog and schema.
    Args:
        function_names (List[str]): A list of function names to process.
        tools_dict (Dict[str, Any]): A dictionary to store the tool instances.
        client: The client used to list functions.
        uc_function_to_tool_func (Callable): A function that converts a UC function
            into a tool instance. This function should accept kwargs only to make
            sure the parameters are passed correctly.
        **kwargs: Additional keyword arguments to pass to the conversion function for
            tool framework-specific configuration.
    Returns:
        Dict[str, Any]: The updated tools dictionary.
    """
    max_results = int(
        os.environ.get("UC_LIST_FUNCTIONS_MAX_RESULTS", UC_LIST_FUNCTIONS_MAX_RESULTS)
    )
    for name in function_names:
        if name not in tools_dict:
            full_func_name = FullFunctionName.validate_full_function_name(name)
            if full_func_name.function == "*":
                token = None
                # functions with BROWSE permission should not be included since this
                # function should include only the functions that can be executed
                list_kwarg = (
                    {"include_browse": False}
                    if "include_browse" in inspect.signature(client.list_functions).parameters
                    else {}
                )
                while True:
                    functions = client.list_functions(
                        catalog=full_func_name.catalog,
                        schema=full_func_name.schema,
                        max_results=max_results,
                        page_token=token,
                        **list_kwarg,
                    )
                    # TODO: get functions in parallel
                    for f in functions:
                        if f.full_name not in tools_dict:
                            tools_dict[f.full_name] = uc_function_to_tool_func(
                                function_name=f.full_name, client=client, **kwargs
                            )
                    token = functions.token
                    if token is None:
                        break
            else:
                tool = uc_function_to_tool_func(function_name=name, client=client, **kwargs)
                # Skip adding this tool if this function returns None
                if tool:
                    tools_dict[name] = tool
    return tools_dict

    Process function names and update the tools dictionary.
    Iterates over the provided function names, converts them into tool instances
    using the provided conversion function, and updates the `tools_dict`.
    Handles wildcard function names (e.g., function name ending with '*') by
    listing all functions in the specified catalog and schema.
    Args:
        function_names (List[str]): A list of function names to process.
        tools_dict (Dict[str, Any]): A dictionary to store the tool instances.
        client: The client used to list functions.
        uc_function_to_tool_func (Callable): A function that converts a UC function
            into a tool instance. This function should accept kwargs only to make
            sure the parameters are passed correctly.
        **kwargs: Additional keyword arguments to pass to the conversion function for
            tool framework-specific configuration.
    Returns:
        Dict[str, Any]: The updated tools dictionary.
    
ai/core/src/unitycatalog/ai/core/utils/function_processing_utils.py