code: def test_matcher_text_similarity():
      matcher = MultiModalPredictor(
          problem_type="text_similarity",
          hyperparameters={
              "model.hf_text.checkpoint_name": "sentence-transformers/all-MiniLM-L6-v2"
          },
      )
      corpus = [
          "A man is eating food.",
          "A man is eating a piece of bread.",
          "The girl is carrying a baby.",
          "A man is riding a horse.",
          "A woman is playing violin.",
          "Two men pushed carts through the woods.",
          "A man is riding a white horse on an enclosed ground.",
          "A monkey is playing drums.",
          "A cheetah is running behind its prey.",
      ]
      queries = [
          "A man is eating pasta.",
          "Someone in a gorilla costume is playing a set of drums.",
          "A cheetah chases prey on across a field.",
      ]
      query_embeddings = matcher.extract_embedding(queries)
      corpus_embeddings = matcher.extract_embedding(corpus)
      assert len(query_embeddings) == len(queries)
      assert len(corpus_embeddings) == len(corpus)
  
      query_embeddings = matcher.extract_embedding(
          queries, signature="query"
      )
      corpus_embeddings = matcher.extract_embedding(
          corpus, signature="response"
      )
      assert len(query_embeddings) == len(queries)
      assert len(corpus_embeddings) == len(corpus)
  
      query_embeddings = matcher.extract_embedding({"abc": queries})
      corpus_embeddings = matcher.extract_embedding({"abc": corpus})
      assert len(query_embeddings) == len(queries)
      assert len(corpus_embeddings) == len(corpus)
  
      query_embeddings = matcher.extract_embedding(
          {"abc": queries}, signature="query"
      )
      corpus_embeddings = matcher.extract_embedding(
          {"abc": corpus}, signature="response"
      )
      assert len(query_embeddings) == len(queries)
      assert len(corpus_embeddings) == len(corpus)
  
file_path: autogluon/multimodal/tests/unittests/others_2/test_zero_shot.py
imports: import numpy
  import pytest
  import requests
  from PIL import Image
  from autogluon.multimodal import MultiModalPredictor
label_desc: Use image node_id 4 for calling a global function with example usage: test_matcher_text_similarity() without return types