def test_collect_marqo_error_response_should_set_doc_visited_if_original_id_is_present(self):
        """
        When dealing with duplicates, we only consider the last doc with that id, even it's not valid
        """
        collector = AddDocumentsResponseCollector()
        collector.collect_marqo_doc(5, {'_id': 'doc_id1'}, 'doc_id1')
        collector.collect_error_response('doc_id1', AddDocumentsError('error message'))
        self.assertTrue(collector.visited('doc_id1'))

        When dealing with duplicates, we only consider the last doc with that id, even it's not valid
        
tests/unit_tests/marqo/core/vespa_index/test_add_documents_response_collector.py