def set_ids(self, item_list):
        """ set ids on an object, using internal mapping then new ids """
        self._reset_sequence()
        for item in item_list:
            key = self.nondup_key_for_item(item)
            item[self.id_key] = self.ids.get(key) or self._get_next_id()
def set_ids ( self , item_list ) : self . _reset_sequence ( ) for item in item_list : key = self . nondup_key_for_item ( item ) item [ self . id_key ] = self . ids . get ( key ) or self . _get_next_id ( )
set ids on an object, using internal mapping then new ids