code: def test_get_output_for(self, ScaleLayer, init_scales):
      input_shape = (2, 3, 4)
      # random input tensor
      input = np.random.randn(*input_shape).astype(theano.config.floatX)
      # default: share scales over all but second axis
      layer = ScaleLayer(input_shape, scales=init_scales)
      assert np.allclose(
          layer.get_output_for(input).eval(),
          input * init_scales((1, 3, 1)),
      )
      # share over first axis only
      layer = ScaleLayer(input_shape, scales=init_scales, shared_axes=0)
      assert np.allclose(
          layer.get_output_for(input).eval(),
          input * init_scales((1, 3, 4)),
      )
      # share over second and third axis
      layer = ScaleLayer(
          input_shape, scales=init_scales, shared_axes=(1, 2)
      )
      assert np.allclose(
          layer.get_output_for(input).eval(),
          input * init_scales((2, 1, 1)),
      )
  
imports: from mock import Mock
  import numpy
  import pytest
  import theano
  from lasagne.layers import InputLayer, standardize, get_output, get_all_params
  from lasagne.utils import floatX
label_desc: Use image node_id 4 for calling the TestScaleLayer obj's underlying member method code with example usage: obj.test_get_output_for(ScaleLayer, init_scales) without return types