code: def test_run_skip_policy(self):
      document_store = InMemoryDocumentStore()
      writer = DocumentWriter(
          document_store, policy=DuplicatePolicy.SKIP
      )
      documents = [
          Document(content="This is the text of a document."),
          Document(content="This is the text of another document."),
      ]
  
      result = writer.run(documents=documents)
      assert result["documents_written"] == 2
  
      result = writer.run(documents=documents)
      assert result["documents_written"] == 0
  
file_path: haystack/test/components/writers/test_document_writer.py
imports: import pytest
  from haystack import Document, DeserializationError
  from haystack.testing.factory import document_store_class
  from haystack.components.writers.document_writer import DocumentWriter
  from haystack.document_stores.types import DuplicatePolicy
  from haystack.document_stores.in_memory import InMemoryDocumentStore
label_desc: Use image node_id 8 for calling the TestDocumentWriter obj's underlying member method code with example usage: obj.test_run_skip_policy() without return types