code: def test_all_methods():
      greedy_settings = TTSettings(
          min_length=5, max_length=5, no_repeat_ngram_size=2
      )
      output_greedy = happy_tt.generate_text(
          "translate English to French: Hello my name is Eric",
          args=greedy_settings,
      )
  
      beam_settings = TTSettings(
          min_length=5, max_length=5, early_stopping=True, num_beams=5
      )
  
      output_beam_search = happy_tt.generate_text(
          "translate English to French: Hello my name is Eric",
          args=beam_settings,
      )
  
      generic_sampling_settings = TTSettings(
          min_length=5,
          max_length=5,
          do_sample=True,
          early_stopping=False,
          top_k=0,
          temperature=0.7,
      )
  
      output_generic_sampling = happy_tt.generate_text(
          "translate English to French: Hello my name is Eric",
          args=generic_sampling_settings,
      )
  
      top_k_sampling_settings = TTSettings(
          min_length=5,
          max_length=5,
          do_sample=True,
          early_stopping=False,
          top_k=50,
          temperature=0.7,
      )
  
      output_top_k_sampling = happy_tt.generate_text(
          "translate English to French: Hello my name is Eric",
          args=top_k_sampling_settings,
      )
  
      top_p_sampling_settings = TTSettings(
          min_length=5,
          max_length=5,
          do_sample=True,
          early_stopping=False,
          top_k=0,
          top_p=0.8,
          temperature=0.7,
      )
  
      output_top_p_sampling = happy_tt.generate_text(
          "translate English to French: Hello my name is Eric",
          args=top_p_sampling_settings,
      )
  
      assert type(output_greedy.text) == str
      assert type(output_beam_search.text) == str
      assert type(output_generic_sampling.text) == str
      assert type(output_top_k_sampling.text) == str
      assert type(output_top_p_sampling.text) == str
  
      print("greedy: ", output_greedy.text, end="\n\n")
      print("beam-search: ", output_beam_search.text, end="\n\n")
      print(
          "generic-sampling: ", output_generic_sampling.text, end="\n\n"
      )
      print("top-k-sampling: ", output_top_k_sampling.text, end="\n\n")
      print("top-p-sampling: ", output_top_p_sampling.text, end="\n\n")
  
file_path: happy-transformer/tests/test_tt.py
imports: import torch
  from happytransformer import HappyTextToText, TTSettings, TTTrainArgs, TTEvalArgs
  from tests import happy_tt
  from tests.run_save_load import run_save_load
label_desc: Use image node_id 3 for calling a global function with example usage: test_all_methods() without return types