code: def test_from_pretrained(multi_qa_model: SentenceTransformer) -> None:
      # Example taken from https://www.sbert.net/docs/hugging_face.html#using-hugging-face-models.
      query_embedding = multi_qa_model.encode("How big is London")
      passage_embedding = multi_qa_model.encode(
          [
              "London has 9,787,426 inhabitants at the 2011 census",
              "London is known for its financial district",
          ]
      )
      print(
          "Similarity:",
          util.dot_score(query_embedding, passage_embedding),
      )
  
file_path: huggingface_hub/contrib/sentence_transformers/test_sentence_transformers.py
imports: import time
  import pytest
  from sentence_transformers import SentenceTransformer, util
  from huggingface_hub import model_info
  from ..utils import production_endpoint
label_desc: Use image node_id 2 for calling a global function with example usage: test_from_pretrained(multi_qa_model) without return types