code: def test_get_output_for(self, BiasLayer, init_b):
      input_shape = (2, 3, 4)
      # random input tensor
      input = np.random.randn(*input_shape).astype(theano.config.floatX)
      # default: share biases over all but second axis
      layer = BiasLayer(input_shape, b=init_b)
      assert np.allclose(
          layer.get_output_for(input).eval(), input + init_b((1, 3, 1))
      )
      # share over first axis only
      layer = BiasLayer(input_shape, b=init_b, shared_axes=0)
      assert np.allclose(
          layer.get_output_for(input).eval(), input + init_b((1, 3, 4))
      )
      # share over second and third axis
      layer = BiasLayer(input_shape, b=init_b, shared_axes=(1, 2))
      assert np.allclose(
          layer.get_output_for(input).eval(), input + init_b((2, 1, 1))
      )
      # no bias
      layer = BiasLayer(input_shape, b=None)
      assert layer.get_output_for(input) is input
  
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 TestBiasLayer obj's underlying member method code with example usage: obj.test_get_output_for(BiasLayer, init_b) without return types