code: def test_non_text_document(self, caplog):
      with caplog.at_level(logging.WARNING):
          cleaner = DocumentCleaner()
          cleaner.run(documents=[Document()])
          assert (
              "DocumentCleaner only cleans text documents but document.content for document ID"
              in caplog.text
          )
  
file_path: haystack/test/components/preprocessors/test_document_cleaner.py
imports: import logging
  import pytest
  from haystack import Document
  from haystack.components.preprocessors import DocumentCleaner
label_desc: Use image node_id 2 for calling the TestDocumentCleaner obj's underlying member method code with example usage: obj.test_non_text_document(caplog) without return types