code: def test_load_extract_s3e_embeddings():
      load_dir = Path("samples/s3e/fitted_s3e")
      use_gpu = False
      batch_size = 2
  
      with open(load_dir / "s3e_stats.pkl", "rb") as f:
          s3e_stats = pickle.load(f)
  
      # Init inferencer
      inferencer = Inferencer.load(
          model_name_or_path=load_dir,
          task_type="embeddings",
          gpu=use_gpu,
          batch_size=batch_size,
          extraction_strategy="s3e",
          extraction_layer=-1,
          s3e_stats=s3e_stats,
          num_processes=0,
      )
  
      # Input
      basic_texts = [
          {"text": "a man is walking on the street."},
          {"text": "a woman is walking on the street."},
      ]
  
      # Get embeddings for input text
      result = inferencer.inference_from_dicts(dicts=basic_texts)
      assert result[0]["context"] == basic_texts[0]["text"]
      assert result[0]["vec"][0] - 0.00527727306941057 < 1e-6
      assert result[0]["vec"][-2] + 0.06285100416478565 < 1e-6
  
file_path: FARM/test/test_s3e_pooling.py
imports: import logging
  import pickle
  from pathlib import Path
  from farm.data_handler.processor import InferenceProcessor
  from farm.infer import Inferencer
  from farm.modeling.adaptive_model import AdaptiveModel
  from farm.modeling.language_model import LanguageModel
  from farm.modeling.tokenization import Tokenizer
  from farm.utils import set_all_seeds, initialize_device_settings
  from farm.modeling.wordembedding_utils import fit_s3e_on_corpus
label_desc: Use image node_id 2 for calling a global function with example usage: test_load_extract_s3e_embeddings() without return types