code: def test_split_by_passage(self):
      splitter = DocumentSplitter(split_by="passage", split_length=1)
      result = splitter.run(
          documents=[
              Document(
                  content="This is a text with some words. There is a second sentence.\n\nAnd there is a third sentence.\n\n And another passage."
              )
          ]
      )
      assert len(result["documents"]) == 3
      assert (
          result["documents"][0].content
          == "This is a text with some words. There is a second sentence.\n\n"
      )
      assert (
          result["documents"][1].content
          == "And there is a third sentence.\n\n"
      )
      assert result["documents"][2].content == " And another passage."
  
file_path: haystack/test/components/preprocessors/test_document_splitter.py
imports: import pytest
  from haystack import Document
  from haystack.components.preprocessors import DocumentSplitter
label_desc: Use image node_id 10 for calling the TestDocumentSplitter obj's underlying member method code with example usage: obj.test_split_by_passage() without return types