code: def LanguageUnderstanding_train(reader, model, max_epochs):
      model.update_signature(
          Sequence[SparseTensor[LanguageUnderstanding.vocab_size]]
      )
      criterion = create_criterion_function(model)
      labels = reader.streams.slot_labels
  
      epoch_size = 36000
      minibatch_size = 70
  
      learner = fsadagrad(
          criterion.parameters,
          lr=learning_parameter_schedule_per_sample(
              [0.003] * 2 + [0.0015] * 12 + [0.0003],
              epoch_size=epoch_size,
          ),
          momentum=momentum_schedule(0.9, minibatch_size),
          gradient_clipping_threshold_per_sample=15,
          gradient_clipping_with_truncation=True,
      )
  
      trainer = Trainer(None, criterion, learner)
      progress_printer = ProgressPrinter(
          freq=100, first=10, tag="Training"
      )  # more detailed logging
      t = 0
      for epoch in range(max_epochs):  # loop over epochs
          epoch_end = (epoch + 1) * epoch_size
          while t < epoch_end:  # loop over minibatches on the epoch
              data = reader.next_minibatch(
                  min(minibatch_size, epoch_end - t)
              )  # fetch minibatch
              trainer.train_minibatch(
                  {
                      criterion.arguments[0]: data[
                          reader.streams.query
                      ],
                      criterion.arguments[1]: data[labels],
                  }
              )  # update model with it
              t += data[
                  labels
              ].num_samples  # count samples processed so far
              progress_printer.update_with_trainer(
                  trainer, with_metric=True
              )
  
file_path: CNTK/Tests/EndToEndTests/EvalClientTests/CNTKLibraryCSEvalExamplesTest/train_models_for_evaluation.py
imports: import os
  import sys
  import argparse
  import zipfile
  import math
  import cntk
  import prepare_test_data
  import TrainResNet_CIFAR10
  import LanguageUnderstanding
  from cntk.layers.typing import *
  from cntk import *
  from cntk.logging import *
label_desc: Use image node_id 4 for calling a global function with example usage: LanguageUnderstanding_train(reader, model, max_epochs) without return types