code: def test_train_load_use_tagger_adam(
      results_base_path, tasks_base_path
  ):
      corpus = flair.datasets.ColumnCorpus(
          data_folder=tasks_base_path / "fashion",
          column_format={0: "text", 3: "ner"},
      )
      tag_dictionary = corpus.make_label_dictionary(
          "ner", add_unk=False
      )
  
      tagger: SequenceTagger = SequenceTagger(
          hidden_size=64,
          embeddings=turian_embeddings,
          tag_dictionary=tag_dictionary,
          tag_type="ner",
          use_crf=False,
      )
  
      # initialize trainer
      trainer: ModelTrainer = ModelTrainer(tagger, corpus)
  
      trainer.train(
          results_base_path,
          learning_rate=0.1,
          mini_batch_size=2,
          max_epochs=2,
          shuffle=False,
          optimizer=Adam,
      )
  
      del trainer, tagger, tag_dictionary, corpus
      loaded_model: SequenceTagger = SequenceTagger.load(
          results_base_path / "final-model.pt"
      )
  
      sentence = Sentence("I love Berlin")
      sentence_empty = Sentence("       ")
  
      loaded_model.predict(sentence)
      loaded_model.predict([sentence, sentence_empty])
      loaded_model.predict([sentence_empty])
  
      del loaded_model
  
file_path: flair/tests/test_trainer.py
imports: import pytest
  from torch.optim import Adam
  import flair
  from flair.data import Sentence
  from flair.datasets import ClassificationCorpus
  from flair.embeddings import DocumentPoolEmbeddings, FlairEmbeddings, WordEmbeddings
  from flair.models import SequenceTagger, TextClassifier
  from flair.trainers import ModelTrainer
label_desc: Use image node_id 3 for calling a global function with example usage: test_train_load_use_tagger_adam(results_base_path, tasks_base_path) without return types