code: def test_prepare_texts_to_embed_w_metadata(self):
      documents = [
          Document(
              content=f"document number {i}:\ncontent",
              meta={"meta_field": f"meta_value {i}"},
          )
          for i in range(5)
      ]
  
      embedder = OpenAIDocumentEmbedder(
          api_key="fake-api-key",
          meta_fields_to_embed=["meta_field"],
          embedding_separator=" | ",
      )
  
      prepared_texts = embedder._prepare_texts_to_embed(documents)
  
      # note that newline is replaced by space
      assert prepared_texts == [
          "meta_value 0 | document number 0: content",
          "meta_value 1 | document number 1: content",
          "meta_value 2 | document number 2: content",
          "meta_value 3 | document number 3: content",
          "meta_value 4 | document number 4: content",
      ]
  
file_path: haystack/test/components/embedders/test_openai_document_embedder.py
imports: import os
  from typing import List
  import numpy
  import pytest
  from openai import OpenAIError
  from haystack import Document
  from haystack.components.embedders.openai_document_embedder import OpenAIDocumentEmbedder
label_desc: Use image node_id 6 for calling the TestOpenAIDocumentEmbedder obj's underlying member method code with example usage: obj.test_prepare_texts_to_embed_w_metadata() without return types