code: def test_bad_words():
      # Test single words
      args_test_word_single = GENSettings(bad_words=["new", "tool"])
      # result without bad_words:  "a new field of research that has been gaining momentum"
      output_single = happy_gen.generate_text(
          "Artificial intelligence is ", args=args_test_word_single
      )
      output_words_single = output_single.text.split()
      for phrase in args_test_word_single.bad_words:
          for word in phrase.split():
              assert word not in output_words_single
      # Test phrases
      args_test_word_phrase = GENSettings(bad_words=["new field"])
      output_phrase = happy_gen.generate_text(
          "Artificial intelligence is ", args=args_test_word_phrase
      )
      for phrase in args_test_word_phrase.bad_words:
          assert phrase not in output_phrase.text
  
imports: import torch
  from happytransformer import HappyGeneration, GENSettings, GENTrainArgs, GENEvalArgs
  import pytest
  from tests.run_save_load import run_save_load
  from tests import happy_gen
label_desc: Use image node_id 3 for calling a global function with example usage: test_bad_words() without return types