def register(cls, fr: type):
        """Register a class as a data model for deserialization."""
        if (model := ModelStore.to_pydantic(fr)) is None:
            return

        name = model.__name__
        if name not in cls.store:
            cls.store[name] = {}
        version = ModelStore.get_version(model)
        cls.store[name][version] = model

        for f_info in model.model_fields.values():
            if (anno := ModelStore.to_pydantic(f_info.annotation)) is not None:
                cls.register(anno)
Register a class as a data model for deserialization.
src/datachain/lib/model_store.py