code: def test_get_layer_by_name_from_connection(self):
      network = layers.join(
          layers.Input(10, name="input-1"),
          layers.Relu(8, name="relu-0"),
          layers.Relu(5, name="relu-1"),
      )
  
      reul0 = network.layer("relu-0")
      self.assertShapesEqual(reul0.output_shape, (None, 8))
  
      reul1 = network.layer("relu-1")
      self.assertShapesEqual(reul1.output_shape, (None, 5))
  
      message = "Cannot find layer with name 'some-layer-name'"
      with self.assertRaisesRegexp(NameError, message):
          network.layer("some-layer-name")
  
      message = "Layer name expected to be a string"
      with self.assertRaisesRegexp(ValueError, message):
          network.layer(object)
  
file_path: neupy/tests/layers/graph/test_slicing.py
imports: import numpy
  from neupy import layers
  from neupy.utils import asfloat
  from base import BaseTestCase
label_desc: Use image node_id 10 for calling the SliceLayerConnectionsTestCase obj's underlying member method code with example usage: obj.test_get_layer_by_name_from_connection() without return types