def __init__(
        self,
        app: Optional[Union[VirtualApp, serial_utils.JSON]] = None,
        **kwargs: Any,
    ):
        """Virtual app for logging existing app results."""

        if app is None:
            app = VirtualApp()
        else:
            if isinstance(app, dict):
                app = VirtualApp(app)
            else:
                raise ValueError(
                    "Unknown type for `app`. "
                    "Either dict or `trulens.apps.virtual.VirtualApp` expected."
                )

        if (
            kwargs.get("selector_nocheck") is False
            or kwargs.get("selector_check_warning") is True
        ):
            raise ValueError(
                "Selector prechecking does not work with virtual apps. "
                "The settings `selector_nocheck=True` and `selector_check_warning=False` are required."
            )

        super().__init__(app=app, **kwargs)
Virtual app for logging existing app results.
src/core/trulens/apps/virtual.py