code: def test_gated_average_layer_exceptions_index_position(self):
      networks = layers.parallel(
          layers.Input(10) >> layers.Softmax(2),
          layers.Input(20) >> layers.Relu(8),
          layers.Input(20) >> layers.Relu(8),
      )
      with self.assertRaisesRegexp(
          LayerConnectionError, "Invalid index"
      ):
          layers.join(networks, layers.GatedAverage(gate_index=3))
  
      with self.assertRaisesRegexp(
          LayerConnectionError, "Invalid index"
      ):
          layers.join(networks, layers.GatedAverage(gate_index=-4))
  
file_path: neupy/tests/layers/test_gated_average.py
imports: import numpy
  from neupy import layers
  from neupy.utils import asfloat
  from neupy.exceptions import LayerConnectionError
  from base import BaseTestCase
label_desc: Use image node_id 3 for calling the GatedAverageTestCase obj's underlying member method code with example usage: obj.test_gated_average_layer_exceptions_index_position() without return types