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)
  
      print("Transforming datasets...")
      p = IndexTransformer(use_char=args.no_char_feature)
      p.fit(x_train, y_train)
  
      print("Building a model.")
      model = BiLSTMCRF(
          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,
          dropout=args.dropout,
          use_char=args.no_char_feature,
          use_crf=args.no_use_crf,
      )
      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_valid, y_valid)
  
      print("Saving the model...")
      model.save(args.weights_file, args.params_file)
      p.save(args.preprocessor_file)
  
imports: import argparse
  import os
  from anago.utils import load_data_and_labels
  from anago.models import BiLSTMCRF
  from anago.preprocessing import IndexTransformer
  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