class_docstr: An internal class to simplify creation of prebuilt pipeline for indexing documents into a DocumentStore. Indexing
  pipeline automatically detect the file type of the input files and converts them into Documents. The supported
  file types are: .txt, .pdf, and .html
class_docstr_tok: ["An","internal","class","to","simplify","creation","of","prebuilt","pipeline","for","indexing","documents","into","a","DocumentStore",".","Indexing","pipeline","automatically","detect","the","file","type","of","the","input","files","and","converts","them","into","Documents",".","The","supported","file","types","are",":",".txt",",",".pdf",",","and",".html"]
code: def _create_embedder(
      self,
      embedder_class: Type,
      model: str,
      init_kwargs: Optional[Dict[str, Any]] = None,
  ) -> Any:
      # Note: here we assume the embedder accepts a parameter called `model` that takes the model's name or path.
      # See https://github.com/deepset-ai/haystack/issues/6534
      kwargs = {**(init_kwargs or {}), "model": model}
      return embedder_class(**kwargs)
  
imports: import os
  import re
  from pathlib import Path
  from tempfile import NamedTemporaryFile
  from typing import Optional, List, Any, Dict
  from typing import Union, Type
  from haystack import Pipeline
  from haystack.components.converters import TextFileToDocument
  from haystack.components.embedders import SentenceTransformersDocumentEmbedder, OpenAIDocumentEmbedder
  from haystack.components.fetchers import LinkContentFetcher
  from haystack.components.preprocessors import DocumentCleaner, DocumentSplitter
  from haystack.components.routers import FileTypeRouter
  from haystack.components.joiners import DocumentJoiner
  from haystack.components.writers import DocumentWriter
  from haystack.document_stores.types import DocumentStore
label_desc: Use image node_id 4 for calling the _IndexingPipeline obj's underlying member method code with example usage: obj._create_embedder(embedder_class, model, init_kwargs) and returns: embedder_class