code: def test_learner_logging():
      from cntk import Trainer
      from cntk.logging import ProgressPrinter
      from cntk import cross_entropy_with_softmax, classification_error
  
      features = C.input_variable(
          shape=(1,), needs_gradient=True, name="a"
      )
      w_init = 1
      w = parameter(shape=(1,), init=w_init)
      z = features * w
      labels = C.input_variable(shape=(1,), name="b")
      ce = cross_entropy_with_softmax(z, labels)
      errs = classification_error(z, labels)
  
      writer = TestProgressWriter()
      lr_values = [0.3, 0.2, 0.1, 0]
      m_values = [0.6, 0.7, 0.8]
      learner = C.momentum_sgd(
          z.parameters,
          C.learning_parameter_schedule_per_sample(
              lr_values, epoch_size=1
          ),
          C.momentum_schedule(m_values, epoch_size=1),
      )
      trainer = Trainer(z, (ce, errs), [learner], writer)
  
      for i in range(10):
          trainer.train_minibatch({features: [[2.0]], labels: [[1.0]]})
  
      assert len(writer.log_output) == len(lr_values + m_values)
  
      values = [j for i in zip(lr_values, m_values) for j in i] + [0]
  
      for i in range(len(values)):
          assert values[i] == writer.log_output[i]
  
imports: from __future__ import division, print_function
  import numpy
  import cntk
  from cntk import parameter
  import pytest
  import sys
  import itertools
  from cntk.logging import ProgressPrinter
  from cntk.learners import sgd, learning_rate_schedule, learning_parameter_schedule, UnitType, universal
  from cntk.layers import Dense, Sequential
label_desc: Use image node_id 11 for calling a global function with example usage: test_learner_logging() without return types