code: def reproducible_network_train(
      seed=0, epochs=500, **additional_params
  ):
      """
      Make a reproducible train for Gradient Descent based neural
      network with a XOR problem and return trained network.
  
      Parameters
      ----------
      seed : int
          Random State seed number for reproducibility. Defaults to ``0``.
      epochs : int
          Number of epochs for training. Defaults to ``500``.
      **additional_params
          Aditional parameters for Neural Network.
  
      Returns
      -------
      GradientDescent instance
          Returns trained network.
      """
      utils.reproducible(seed)
  
      xor_x_train = np.array([[-1, -1], [-1, 1], [1, -1], [1, 1]])
      xor_y_train = np.array([[1, -1, -1, 1]]).T
  
      xavier_normal = init.XavierNormal()
      tanh_weight1 = xavier_normal.sample((2, 5), return_array=True)
      tanh_weight2 = xavier_normal.sample((5, 1), return_array=True)
  
      network = algorithms.GradientDescent(
          network=[
              layers.Input(2),
              layers.Tanh(5, weight=tanh_weight1),
              layers.Tanh(1, weight=tanh_weight2),
          ],
          batch_size=None,
          **additional_params,
      )
      network.train(xor_x_train, xor_y_train, epochs=epochs)
      return network
  
file_path: neupy/tests/helpers.py
imports: import sys
  from contextlib import contextmanager
  import six
  import numpy
  import pandas
  from sklearn import datasets
  from sklearn.model_selection import StratifiedShuffleSplit
  from matplotlib import pyplot
  from neupy import algorithms, layers, utils, init
  from neupy.storage import save_dict, load_dict
label_desc: Use image node_id 4 for calling a global function with example usage: reproducible_network_train(seed, epochs) and returns: network