code: def test_print_training_progress_signal(self):
      x_train = np.array([[0, 0], [0, 1], [1, 0], [1, 1]])
      y_train = np.array([[1, 0, 0, 1]]).T
  
      Case = namedtuple("Case", "show_epoch should_be_n_times n_epochs")
      cases = (
          Case(show_epoch=5, should_be_n_times=3, n_epochs=10),
          Case(show_epoch=7, should_be_n_times=3, n_epochs=10),
          Case(show_epoch=100, should_be_n_times=2, n_epochs=10),
      )
  
      for case in cases:
          with catch_stdout() as out:
              bpnet = algorithms.GradientDescent(
                  layers.join(
                      layers.Input(2),
                      layers.Sigmoid(3),
                      layers.Sigmoid(1),
                  ),
                  step=0.1,
                  verbose=True,
                  batch_size=None,
                  show_epoch=case.show_epoch,
              )
              bpnet.train(x_train, y_train, epochs=case.n_epochs)
              terminal_output = out.getvalue()
  
          # One of the choices has to be true whether other
          # choices should give count equal to zero.
          time_counts = (
              terminal_output.count(" μs]")
              + terminal_output.count(" ms]")
              + terminal_output.count(" ns]")
          )
          self.assertEqual(case.should_be_n_times, time_counts)
  
imports: from __future__ import unicode_literals
  from collections import namedtuple
  import numpy
  import progressbar
  from sklearn.datasets import make_classification
  from neupy import algorithms, layers
  from neupy.exceptions import StopTraining
  from neupy.algorithms.signals import format_time
  from base import BaseTestCase
  from helpers import catch_stdout
label_desc: Use image node_id 5 for calling the SignalsTestCase obj's underlying member method code with example usage: obj.test_print_training_progress_signal() without return types