def load(obj, *args, **kwargs):
        """Deserialize/load this object using the class information in
        tru_class_info to lookup the actual class that will do the deserialization."""

        if not isinstance(obj, dict):
            return obj

        if constant_utils.CLASS_INFO not in obj:
            raise ValueError("No class info present in object.")

        clsinfo = Class.model_validate(obj[constant_utils.CLASS_INFO])
        try:
            # If class cannot be loaded, usually because it is not importable,
            # return obj as is.
            cls = clsinfo.load()
        except RuntimeError:
            return obj

        # TODO: We shouldn't be doing a lot of these pydantic details but could
        # not find how to integrate with existing pydantic functionality. Please
        # figure it out.
        validated = {}

        for k, finfo in cls.model_fields.items():
            typ = finfo.annotation
            val = finfo.get_default(call_default_factory=True)

            if k in obj:
                val = obj[k]

            try:
                if (
                    (isinstance(val, dict))
                    and (constant_utils.CLASS_INFO in val)
                    and inspect.isclass(typ)
                    and python_utils.safe_issubclass(typ, WithClassInfo)
                ):
                    subcls = Class.model_validate(
                        val[constant_utils.CLASS_INFO]
                    ).load()

                    val = subcls.model_validate(val)
            except Exception:
                pass

            validated[k] = val

        # Note that the rest of the validation/conversions for things which are
        # not serialized WithClassInfo will be done by pydantic after we return
        # this:
        return validated
Deserialize/load this object using the class information in
        tru_class_info to lookup the actual class that will do the deserialization.
src/core/trulens/core/utils/pyschema.py