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