code: def pretrained_model_score(
      model_name, expected_score: float, max_test_samples: int = 100
  ) -> None:
      model = SentenceTransformer(model_name)
      sts_dataset_path = "datasets/stsbenchmark.tsv.gz"
  
      if not os.path.exists(sts_dataset_path):
          util.http_get(
              "https://sbert.net/datasets/stsbenchmark.tsv.gz",
              sts_dataset_path,
          )
  
      test_samples = []
      with gzip.open(sts_dataset_path, "rt", encoding="utf8") as fIn:
          reader = csv.DictReader(
              fIn, delimiter="\t", quoting=csv.QUOTE_NONE
          )
          for row in reader:
              score = (
                  float(row["score"]) / 5.0
              )  # Normalize score to range 0 ... 1
              inp_example = InputExample(
                  texts=[row["sentence1"], row["sentence2"]],
                  label=score,
              )
  
              if row["split"] == "test":
                  test_samples.append(inp_example)
              if (
                  max_test_samples != -1
                  and len(test_samples) >= max_test_samples
              ):
                  break
  
      evaluator = EmbeddingSimilarityEvaluator.from_input_examples(
          test_samples, name="sts-test"
      )
  
      score = model.evaluate(evaluator) * 100
      print(
          model_name,
          "{:.2f} vs. exp: {:.2f}".format(score, expected_score),
      )
      assert score > expected_score or abs(score - expected_score) < 0.1
  
imports: import csv
  import gzip
  import os
  from functools import partial
  import pytest
  from sentence_transformers import InputExample, SentenceTransformer, util
  from sentence_transformers.evaluation import EmbeddingSimilarityEvaluator
label_desc: Use image node_id 1 for calling a global function with example usage: pretrained_model_score(model_name, expected_score, max_test_samples) without return types