code: def test_progressbar_signal(self):
      x_train = np.array([[0, 0], [0, 1], [1, 0], [1, 1]])
      y_train = np.array([[1, 0, 0, 1]]).T
  
      class BatchStartSignal(object):
          def update_end(self, network):
              progressbar_signal = network.events.signals[0]
              bar = progressbar_signal.bar
  
              if isinstance(bar, progressbar.NullBar):
                  network.nullbar += 1
              else:
                  network.otherbar += 1
  
      network = algorithms.GradientDescent(
          layers.join(
              layers.Input(2),
              layers.Sigmoid(1),
          ),
          verbose=False,
          batch_size=2,
          signals=BatchStartSignal,
      )
  
      network.nullbar = 0
      network.otherbar = 0
  
      network.verbose = True
      network.train(x_train, y_train, epochs=10)
  
      self.assertEqual(network.nullbar, 0)
      self.assertEqual(network.otherbar, 20)
  
      network.verbose = True
      network.batch_size = 10
      network.train(x_train, y_train, epochs=10)
  
      self.assertEqual(network.nullbar, 10)
      self.assertEqual(network.otherbar, 20)
  
      network.verbose = False
      network.batch_size = 1
      network.train(x_train, y_train, epochs=10)
  
      self.assertEqual(network.nullbar, 50)
      self.assertEqual(network.otherbar, 20)
  
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 8 for calling the SignalsTestCase obj's underlying member method code with example usage: obj.test_progressbar_signal() without return types