code: def test_get_output_for(self, layer_vars):
      layer = layer_vars["layer"]
      nonlinearity = layer_vars["nonlinearity"]
      num_leading_axes = layer_vars["num_leading_axes"]
      W = layer_vars["W"]()
      b = layer_vars["b"]()
  
      input = theano.shared(np.ones(layer_vars["input_shape"]))
      result = layer.get_output_for(input)
      assert result is nonlinearity.return_value
  
      # Check that the input to the nonlinearity was what we expect
      # from dense layer, i.e. the dot product plus bias
      nonlinearity_arg = nonlinearity.call_args[0][0]
      expected = input.get_value()
      expected = expected.reshape(
          expected.shape[:num_leading_axes] + (-1,)
      )
      expected = np.dot(expected, W) + b
      assert np.allclose(nonlinearity_arg.eval(), expected)
  
imports: from mock import Mock
  import numpy
  import pytest
  import theano
  import lasagne
label_desc: Use image node_id 10 for calling the TestDenseLayer obj's underlying member method code with example usage: obj.test_get_output_for(layer_vars) without return types