code: def test_network_training_summary(self):
      with catch_stdout() as out:
          network = algorithms.GradientDescent(
              layers.join(
                  layers.Input(2),
                  layers.Sigmoid(3),
                  layers.Sigmoid(1),
              ),
              verbose=False,
              batch_size=None,
          )
  
          x = np.zeros((5, 2))
          y = np.zeros((5, 1))
  
          network.verbose = True
          n_epochs = 10
          network.train(x, y, epochs=n_epochs)
  
          terminal_output = out.getvalue().strip()
  
      # `n_epochs - 1` because \n appears only between
      # inline summary lines.
      # Also network prints 5 additional lines at the beggining
      self.assertEqual(terminal_output.count("\n"), n_epochs - 1)
      self.assertEqual(terminal_output.count("train: "), n_epochs)
  
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 6 for calling the SignalsTestCase obj's underlying member method code with example usage: obj.test_network_training_summary() without return types