code: def test_mixture_of_experts_init_gating_network_exceptions(self):
      with self.assertRaisesRegexp(ValueError, "Invalid type"):
          architectures.mixture_of_experts(
              networks=self.networks,
              gating_layer=(layers.Input(1) >> layers.Softmax(2)),
          )
  
      error_message = (
          "Gating layer can work only for combining only "
          "10 networks, got 2 networks instead."
      )
      with self.assertRaisesRegexp(LayerConnectionError, error_message):
          architectures.mixture_of_experts(
              networks=self.networks, gating_layer=layers.Softmax(10)
          )
  
file_path: neupy/tests/architectures/test_mixtures_of_experts.py
imports: import copy
  import numpy
  from sklearn import datasets, preprocessing, model_selection
  from neupy.utils import asfloat
  from neupy.exceptions import LayerConnectionError
  from neupy.algorithms.gd import objectives
  from neupy import algorithms, layers, architectures
  from base import BaseTestCase
label_desc: Use image node_id 4 for calling the MixtureOfExpertsTestCase obj's underlying member method code with example usage: obj.test_mixture_of_experts_init_gating_network_exceptions() without return types