def extract_wrapped_functions(functions: list[Callable[..., Any]]) -> str:
    """
    Extracts the contents of callables that will be wrapped without modification or metadata extraction
    for the purposes of in-lining their definitions into a wrapper function that will be registered to UC.

    Args:
        functions: List of callables to extract.
    Returns:
        The extracted code as a string, prepared for in-lining into the primary function's body.
    """

    if not all(callable(func) for func in functions):
        raise ValueError(
            "Unable to process functions. Ensure that all functions are valid callables."
        )

    sources = []
    for func in functions:
        src, _ = inspect.getsourcelines(func)
        sources.append(dedent("".join(src)))
    return "\n".join(sources)

    Extracts the contents of callables that will be wrapped without modification or metadata extraction
    for the purposes of in-lining their definitions into a wrapper function that will be registered to UC.

    Args:
        functions: List of callables to extract.
    Returns:
        The extracted code as a string, prepared for in-lining into the primary function's body.
    
ai/core/src/unitycatalog/ai/core/utils/callable_utils.py