def entity_to_data(self, entity: Entity, model_class):
        """Stores entity attributes in dictionary with a `data` attribute"""
        data = dict(**entity.__dict__)
        entity_id = str(data.pop("id"))
        return model_class(
            **{
                "id": entity_id,
                "data": data,
            }
        )
Stores entity attributes in dictionary with a `data` attribute
src/seedwork/infrastructure/json_data_mapper.py