<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def linkify_with_contacts(self, contacts):
 """ Link items with contacts items :param contacts: all contacts object :type contacts: alignak.objects.contact.Contacts :return: None """

        for i in self:
            if not hasattr(i, 'contacts'):
                continue

            links_list = strip_and_uniq(i.contacts)
            new = []
            for name in [e for e in links_list if e]:
                contact = contacts.find_by_name(name)
                if contact is not None and contact.uuid not in new:
                    new.append(contact.uuid)
                else:
                    i.add_error("the contact '%s' defined for '%s' is unknown"
                                % (name, i.get_name()))

            i.contacts = new