def _assert_fields_unchanged(self, doc: Dict[str, Any], excluded_fields: List[str]):
        """Verify that fields in the document remain unchanged except for the specified excluded fields.
        
        This helper method checks that all fields in the document match their expected values,
        excluding the fields that were intentionally modified during the test.
        
        Args:
            doc: The document to check
            excluded_fields: List of field names that were intentionally modified and should be excluded from verification
        """
        doc_id = doc['_id']
        doc_to_compare_against = self.id_to_doc[doc_id]
        for field, value in doc_to_compare_against.items():
            if field in excluded_fields:
                continue
            elif field == 'custom_vector_field':
                self.assertEqual(value['content'], doc.get(field, None), f'{field} is changed.')
            elif isinstance(value, dict):
                for k, v in value.items():
                    flattened_field_name = f'{field}.{k}'
                    if flattened_field_name in excluded_fields:
                        continue
                    self.assertEqual(v, doc.get(flattened_field_name, None), f'{flattened_field_name} is changed.')
            else:
                self.assertEqual(value, doc.get(field, None), f'{field} is changed.')
Verify that fields in the document remain unchanged except for the specified excluded fields.
        
        This helper method checks that all fields in the document match their expected values,
        excluding the fields that were intentionally modified during the test.
        
        Args:
            doc: The document to check
            excluded_fields: List of field names that were intentionally modified and should be excluded from verification
        
tests/integ_tests/core/document/test_partial_update_semi_structured.py