code: def test_valid_run(self):
      top_k = 3
      ds = InMemoryDocumentStore(embedding_similarity_function="cosine")
      docs = [
          Document(
              content="my document", embedding=[0.1, 0.2, 0.3, 0.4]
          ),
          Document(
              content="another document", embedding=[1.0, 1.0, 1.0, 1.0]
          ),
          Document(
              content="third document", embedding=[0.5, 0.7, 0.5, 0.7]
          ),
      ]
      ds.write_documents(docs)
  
      retriever = InMemoryEmbeddingRetriever(ds, top_k=top_k)
      result = retriever.run(
          query_embedding=[0.1, 0.1, 0.1, 0.1], return_embedding=True
      )
  
      assert "documents" in result
      assert len(result["documents"]) == top_k
      assert np.array_equal(
          result["documents"][0].embedding, [1.0, 1.0, 1.0, 1.0]
      )
  
imports: from typing import Dict, Any
  import pytest
  import numpy
  from haystack import Pipeline, DeserializationError
  from haystack.testing.factory import document_store_class
  from haystack.components.retrievers.in_memory.embedding_retriever import InMemoryEmbeddingRetriever
  from haystack.dataclasses import Document
  from haystack.document_stores.in_memory import InMemoryDocumentStore
label_desc: Use image node_id 10 for calling the TestMemoryEmbeddingRetriever obj's underlying member method code with example usage: obj.test_valid_run() without return types