code: def restore_retention_data_item(self, data, item):
          properties = item.__class__.properties
          properties.update(item.__class__.running_properties)
          for prop, entry in list(properties.items()):
              if not entry.retention:
                  continue
              if prop not in data:
                  continue
              restore_retention = entry.retention_restoration
              if restore_retention:
                  setattr(item, prop, restore_retention(item, data[prop]))
              else:
                  setattr(item, prop, data[prop])
          for notification_uuid in item.notifications_in_progress:
              notification = item.notifications_in_progress[notification_uuid]
              notification['ref'] = item.uuid
              my_notification = Notification(params=notification)
              item.notifications_in_progress[notification_uuid] = my_notification
              self.add(my_notification)
          item.update_in_checking()
          for downtime_uuid in data['downtimes']:
              downtime = data['downtimes'][downtime_uuid]
              downtime['ref'] = item.uuid
              my_downtime = Downtime(params=downtime)
              if downtime['comment_id']:
                  if downtime['comment_id'] not in data['comments']:
                      downtime['comment_id'] = ''
              if 'uuid' in downtime['comment_id']:
                  data['comments'].append(downtime['comment_id'])
                  downtime['comment_id'] = downtime['comment_id']['uuid']
              item.add_downtime(my_downtime)
          for comment_uuid in data['comments']:
              comment = data['comments'][comment_uuid]
              comment['ref'] = item.uuid
              item.add_comment(Comment(comment))
          if item.acknowledgement is not None:
              item.acknowledgement['ref'] = item.uuid
              item.acknowledgement = Acknowledge(item.acknowledgement)
          new_notified_contacts = set()
          new_notified_contacts_ids = set()
          for contact_name in item.notified_contacts:
              contact = self.contacts.find_by_name(contact_name)
              if contact is not None:
                  new_notified_contacts.add(contact_name)
                  new_notified_contacts_ids.add(contact.uuid)
          item.notified_contacts = new_notified_contacts
          item.notified_contacts_ids = new_notified_contacts_ids