code: def resolve_embedder(
      embedding_model: str,
  ) -> SentenceTransformersTextEmbedder:
      """
      Resolves the embedder
      :param embedding_model: The embedding model to use.
      """
      try:
          embedder = SentenceTransformersTextEmbedder(
              model=embedding_model
          )
      except Exception:
          raise ValueError(
              f"Embedding model: {embedding_model} is not supported. Please provide a SentenceTransformers model."
              f"You can download the models through the huggingface model hub here: https://huggingface.co/sentence-transformers"
          )
      return embedder
  
imports: import re
  from abc import ABC, abstractmethod
  from typing import Optional, Any
  from huggingface_hub import HfApi
  from haystack import Pipeline
  from haystack.components.builders.answer_builder import AnswerBuilder
  from haystack.components.builders.prompt_builder import PromptBuilder
  from haystack.components.embedders import SentenceTransformersTextEmbedder
  from haystack.components.generators import OpenAIGenerator, HuggingFaceTGIGenerator
  from haystack.components.retrievers.in_memory import InMemoryEmbeddingRetriever
  from haystack.dataclasses import Answer
  from haystack.document_stores.types import DocumentStore
  from haystack.document_stores.in_memory import InMemoryDocumentStore
label_desc: Use image node_id 2 for calling a global function with example usage: resolve_embedder(embedding_model) and returns: embedder