code: def test_embeddings_extraction(num_processes, use_fast):
      # Input
      basic_texts = [
          {
              "text": "Schartau sagte dem Tagesspiegel, dass Fischer ein Idiot ist"
          },
          {"text": "Martin Müller spielt Fussball"},
      ]
  
      # Load model, tokenizer and processor directly into Inferencer
      model = Inferencer.load(
          model_name_or_path="bert-base-german-cased",
          task_type="embeddings",
          gpu=False,
          batch_size=5,
          extraction_strategy="reduce_mean",
          extraction_layer=-2,
          use_fast=use_fast,
          num_processes=num_processes,
      )
  
      # Get embeddings for input text (you can vary the strategy and layer)
      result = model.inference_from_dicts(dicts=basic_texts)
      assert result[0]["context"] == basic_texts[0]["text"]
      assert result[0]["vec"].shape == (768,)
      assert np.isclose(
          result[0]["vec"][0], 0.01501756374325071, atol=0.00001
      )
  
imports: import pytest
  import numpy
  from farm.infer import Inferencer
  from transformers import BertTokenizerFast
label_desc: Use image node_id 2 for calling a global function with example usage: test_embeddings_extraction(num_processes, use_fast) without return types