def main_output(func: Callable, ret: Any) -> str:
    """Determine (guess) the "main output" string for a given main app call.

    This is for functions whose output is not a string.

    Args:
        func: The main function whose main output we are guessing.

        ret: The return value of the function.
    """

    if isinstance(ret, serial_utils.JSON_BASES):
        return str(ret)

    if isinstance(ret, Sequence) and all(isinstance(x, str) for x in ret):
        # Chunked/streamed outputs.
        return "".join(ret)

    # Use _extract_content to get the content out of the return value
    content = _extract_content(ret, content_keys=["content", "output"])

    if isinstance(content, str):
        return content

    if isinstance(content, float):
        return str(content)

    if isinstance(content, Dict):
        return str(next(iter(content.values()), ""))

    error_message = (
        f"Could not determine main output of {func.__name__}"
        f" from {python_utils.class_name(type(content))} value {content}."
    )

    if isinstance(content, Sequence):
        if len(content) > 0:
            return str(content[0])
        else:
            return error_message

    else:
        logger.warning(error_message)
        return (
            str(content)
            if content is not None
            else (f"TruLens: {error_message}")
        )
Determine (guess) the "main output" string for a given main app call.

    This is for functions whose output is not a string.

    Args:
        func: The main function whose main output we are guessing.

        ret: The return value of the function.
    
src/core/trulens/core/utils/signature.py