def main_output(
        self, func: Callable, sig: Signature, bindings: BoundArguments, ret: Any
    ) -> Optional[str]:
        """
        Determine the main out string for the given function `func` with
        signature `sig` after it is called with the given `bindings` and has
        returned `ret`.
        """

        try:
            attr = self._main_output_attribute(ret)

            if attr is not None:
                val = getattr(ret, attr)
                if attr == "response_txt":
                    if val is None:
                        # Return a placeholder value for now.
                        return (
                            f"TruLens: this app produced a streaming response of type {python_utils.class_name(type(ret))}. "
                            "The main output will not be available in TruLens."
                        )

                return val

            else:  # attr is None
                return core_app.App.main_output(self, func, sig, bindings, ret)

        except NotImplementedError:
            return None

        Determine the main out string for the given function `func` with
        signature `sig` after it is called with the given `bindings` and has
        returned `ret`.
        
src/apps/llamaindex/trulens/apps/llamaindex/tru_llama.py