def data_to_entity(self, data: dict, entity_class: type[Entity]) -> Entity:
        """Creates business entity from dictionary with a `data` attribute"""
        entity_id = GenericUUID(data.pop("id"))
        entity_dict = {
            "id": entity_id,
            **data,
        }
        return entity_class(**entity_dict)
Creates business entity from dictionary with a `data` attribute
src/seedwork/infrastructure/json_data_mapper.py