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