docstr: Test that stop words are removed from the generated text
  (does not test stopping text generation)
docstr_tok: ["Test","that","stop","words","are","removed","from","the","generated","text","(","does","not","test","stopping","text","generation",")"]
code: def test_run_stop_words_removal(self):
      """
      Test that stop words are removed from the generated text
      (does not test stopping text generation)
      """
      generator = HuggingFaceLocalGenerator(
          model="google/flan-t5-base",
          task="text2text-generation",
          stop_words=["world"],
      )
  
      # create the pipeline object (simulating the warm_up)
      generator.pipeline = Mock(
          return_value=[{"generated_text": "Hello world"}]
      )
  
      results = generator.run(prompt="irrelevant")
  
      assert results == {"replies": ["Hello"]}
  
imports: from unittest.mock import patch, Mock
  import pytest
  import torch
  from transformers import PreTrainedTokenizerFast
  from haystack.components.generators.hugging_face_local import HuggingFaceLocalGenerator, StopWordsCriteria
label_desc: Use image node_id 24 for calling the TestHuggingFaceLocalGenerator obj's underlying member method code with example usage: obj.test_run_stop_words_removal() without return types