code: def test_st_extractor(
      st_extractor: SentenceTransformersExtractor,
      dataset: FeedbackDataset,
      records: List[FeedbackRecord],
  ):
      dataset.add_records(records)
      st_extractor = SentenceTransformersExtractor()
      assert isinstance(st_extractor.model, SentenceTransformer)
      assert (
          st_extractor.embedding_dim
          == st_extractor.model.get_sentence_embedding_dimension()
      )
      assert st_extractor.show_progress
      new_dataset = FeedbackDataset(
          fields=dataset.fields,
          questions=dataset.questions,
          vectors_settings=[
              VectorSettings(
                  name="field_1", dimensions=st_extractor.embedding_dim
              )
          ],
      )
      st_extractor._create_vector_settings = MagicMock(
          return_value=new_dataset
      )
      new_records = []
      for record in records:
          new_records.append(
              FeedbackRecord(
                  fields=record.fields,
                  vectors={"field_1": np.array([1]).tolist()},
              )
          )
      st_extractor._encode_single_field = MagicMock(
          return_value=records
      )
      st_extractor.update_records(records, fields=["field_1"])
      st_extractor._encode_single_field.assert_called_once_with(
          records, "field_1", False
      )
      st_extractor.update_dataset(dataset, update_records=True)
      st_extractor._encode_single_field.call_count == len(
          dataset.fields
      ) + 1
      st_extractor._create_vector_settings.call_count == len(
          dataset.fields
      )
  
file_path: argilla/tests/unit/client/feedback/integrations/test_sentencetransformers.py
imports: from typing import List
  from unittest.mock import MagicMock
  import numpy
  import pytest
  from argilla.client.feedback.dataset.local.dataset import FeedbackDataset
  from argilla.client.feedback.integrations.sentencetransformers import SentenceTransformersExtractor
  from argilla.client.feedback.schemas.fields import TextField
  from argilla.client.feedback.schemas.questions import TextQuestion
  from argilla.client.feedback.schemas.records import FeedbackRecord
  from argilla.client.feedback.schemas.vector_settings import VectorSettings
  from sentence_transformers import SentenceTransformer
label_desc: Use image node_id 4 for calling a global function with example usage: test_st_extractor(st_extractor, dataset, records) without return types