code: def test_get_output_for(
      self, dummy_input_layer, NINLayer_c01b, extra_kwargs
  ):
      nonlinearity = Mock()
  
      layer = NINLayer_c01b(
          dummy_input_layer,
          num_units=6,
          nonlinearity=nonlinearity,
          **extra_kwargs,
      )
  
      input = theano.shared(np.random.uniform(-1, 1, (3, 4, 5, 2)))
      result = layer.get_output_for(input)
      assert result is nonlinearity.return_value
  
      nonlinearity_arg = nonlinearity.call_args[0][0]
      X = input.get_value()
      W = layer.W.get_value()
      out = np.dot(W, X.reshape(X.shape[0], -1))
      out = out.reshape(W.shape[0], X.shape[1], X.shape[2], X.shape[3])
      if layer.b is not None:
          if layer.untie_biases:
              out += layer.b.get_value()[..., None]
          else:
              out += layer.b.get_value()[:, None, None, None]
      assert np.allclose(nonlinearity_arg.eval(), out)
  
imports: from mock import Mock
  import numpy
  import pytest
  import theano
  import lasagne
label_desc: Use image node_id 10 for calling the TestNINLayer_c01b obj's underlying member method code with example usage: obj.test_get_output_for(dummy_input_layer, NINLayer_c01b, extra_kwargs) without return types