Write deserialization function for carry_dict.