code: def build_indexing_pipeline(
      document_store: Any,
      embedding_model: str = "intfloat/e5-base-v2",
      embedding_model_kwargs: Optional[Dict[str, Any]] = None,
      supported_mime_types: Optional[List[str]] = None,
  ):
      """
      Returns a prebuilt pipeline for indexing documents into a DocumentStore. Indexing pipeline automatically detects
      the file type of the input files and converts them into Documents. The supported file types are: .txt,
      .pdf, and .html but by default only .txt and .html are indexed unless the supported_mime_types parameter is set.
  
      Example usage:
  
      ```python
      from haystack.utils import build_indexing_pipeline
      indexing_pipe = build_indexing_pipeline(document_store=your_document_store_instance)
      indexing_pipe.run(files=["path/to/file1", "path/to/file2"])
      >>> {'documents_written': 2}
      ```
  
      One can also pass an embedding model to the pipeline, which will then calculate embeddings for the documents
      and store them in the DocumentStore. Example usage:
      ```python
      indexing_pipe = build_indexing_pipeline(document_store=your_document_store_instance,
                                              embedding_model="sentence-transformers/all-mpnet-base-v2")
      indexing_pipe.run(files=["path/to/file1", "path/to/file2"])
      >>> {'documents_written': 2}
      ```
  
      After running indexing pipeline, the documents are indexed in the DocumentStore and can be used for querying.
  
  
      :param document_store: An instance of a DocumentStore to index documents into.
      :param embedding_model: The name of the model to use for document embeddings.
                              Needs top be compatible with SentenceTransformers
      :param embedding_model_kwargs: Keyword arguments to pass to the embedding model class.
      :param supported_mime_types: List of MIME types to support in the pipeline. If not given,
                                       defaults to ["text/plain", "text/html"].
  
      """
      return _IndexingPipeline(
          document_store=document_store,
          embedding_model=embedding_model,
          embedding_model_kwargs=embedding_model_kwargs,
          supported_mime_types=supported_mime_types,
      )
  
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 2 for calling a global function with example usage: build_indexing_pipeline(document_store, embedding_model, embedding_model_kwargs, supported_mime_types) and returns: _IndexingPipeline