code: def get_test_network():
      net = ToyNet(num_classes=4)
      return net
  
file_path: NiftyNet/tests/gradient_collector_test.py
imports: from __future__ import absolute_import, print_function
  import tensorflow
  from niftynet.engine.application_variables import GradientsCollector
  from niftynet.engine.handler_gradient import ApplyGradients
  from niftynet.network.toynet import ToyNet
  from tests.niftynet_testcase import NiftyNetTestCase
label_desc: Use image node_id 1 for calling a global function with example usage: get_test_network() and returns: net