code: def test_custom_signal_class(self):
      class SimpleSignal(object):
          triggers = []
  
          n_train_start = 0
          n_train_end = 0
  
          n_epoch_start = 0
          n_epoch_end = 0
  
          n_update_start = 0
          n_update_end = 0
  
          n_train_error = 0
          n_valid_error = 0
  
          def train_start(self, network, **data):
              self.n_train_start += 1
              self.triggers.append("train_start")
  
          def train_end(self, network):
              self.n_train_end += 1
              self.triggers.append("train_end")
  
          def epoch_start(self, network):
              self.n_epoch_start += 1
              self.triggers.append("epoch_start")
  
          def epoch_end(self, network):
              self.n_epoch_end += 1
              self.triggers.append("epoch_end")
  
          def update_start(self, network):
              self.n_update_start += 1
              self.triggers.append("update_start")
  
          def update_end(self, network):
              self.n_update_end += 1
              self.triggers.append("update_end")
  
          def train_error(self, network, **data):
              self.n_train_error += 1
              self.triggers.append("train_error")
  
          def valid_error(self, network, **data):
              self.n_valid_error += 1
              self.triggers.append("valid_error")
  
      simple_signal = SimpleSignal()
      train_network(signals=[simple_signal], batch_size=10)
  
      self.assertEqual(simple_signal.n_train_start, 1)
      self.assertEqual(simple_signal.n_train_end, 1)
  
      self.assertEqual(simple_signal.n_epoch_start, 2)
      self.assertEqual(simple_signal.n_epoch_end, 2)
  
      self.assertEqual(simple_signal.n_update_start, 6)
      self.assertEqual(simple_signal.n_update_end, 6)
  
      expected_triggers = [
          "train_start",
          "epoch_start",
          "update_start",
          "train_error",
          "update_end",
          "update_start",
          "train_error",
          "update_end",
          "update_start",
          "train_error",
          "update_end",
          "valid_error",
          "epoch_end",
          "epoch_start",
          "update_start",
          "train_error",
          "update_end",
          "update_start",
          "train_error",
          "update_end",
          "update_start",
          "train_error",
          "update_end",
          "valid_error",
          "epoch_end",
          "train_end",
      ]
      self.assertSequenceEqual(
          expected_triggers, simple_signal.triggers
      )
  
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 3 for calling the SignalsTestCase obj's underlying member method code with example usage: obj.test_custom_signal_class() without return types