def extract_function_body(func: Callable[..., Any]) -> tuple[str, int]:
    """
    Extracts the body of a function as a string without the signature or docstring,
    dedents the code, and returns the indentation unit used in the function.

    Args:
        func: The function from which to extract the body.

    Returns:
        A tuple containing the dedented function body and the indentation unit.

    """
    source_lines, _ = inspect.getsourcelines(func)
    dedented_source = dedent("".join(source_lines))
    func_name = func.__name__

    extractor = FunctionBodyExtractor(func_name, dedented_source)
    parsed_source = ast.parse(dedented_source)
    extractor.visit(parsed_source)

    return extractor.function_body, extractor.indent_unit

    Extracts the body of a function as a string without the signature or docstring,
    dedents the code, and returns the indentation unit used in the function.

    Args:
        func: The function from which to extract the body.

    Returns:
        A tuple containing the dedented function body and the indentation unit.

    
ai/core/src/unitycatalog/ai/core/utils/callable_utils.py