code: def main(args):
      print("Loading dataset...")
      x_train, y_train = load_data_and_labels(args.train_data)
      x_valid, y_valid = load_data_and_labels(args.valid_data)
      x_test, y_test = load_data_and_labels(args.test_data)
      x_train = np.r_[x_train, x_valid]
      y_train = np.r_[y_train, y_valid]
  
      print("Transforming datasets...")
      p = ELMoTransformer()
      p.fit(x_train, y_train)
  
      print("Loading word embeddings...")
      embeddings = load_glove(EMBEDDING_PATH)
      embeddings = filter_embeddings(
          embeddings, p._word_vocab.vocab, 100
      )
  
      print("Building a model.")
      model = ELModel(
          char_embedding_dim=args.char_emb_size,
          word_embedding_dim=args.word_emb_size,
          char_lstm_size=args.char_lstm_units,
          word_lstm_size=args.word_lstm_units,
          char_vocab_size=p.char_vocab_size,
          word_vocab_size=p.word_vocab_size,
          num_labels=p.label_size,
          embeddings=embeddings,
          dropout=args.dropout,
      )
      model, loss = model.build()
      model.compile(loss=loss, optimizer="adam")
  
      print("Training the model...")
      trainer = Trainer(model, preprocessor=p)
      trainer.train(x_train, y_train, x_test, y_test)
  
      print("Saving the model...")
      model.save(args.weights_file, args.params_file)
  
file_path: anago/examples/elmo_example.py
imports: import argparse
  import os
  import numpy
  from anago.utils import load_data_and_labels, load_glove, filter_embeddings
  from anago.models import ELModel
  from anago.preprocessing import ELMoTransformer
  from anago.trainer import Trainer
label_desc: Use image node_id 1 for calling a global function with example usage: main(args) without return types