code: def layer_vars(self, request, dummy_input_layer, DenseLayer):
      input_shape = dummy_input_layer.shape
      num_units = 5
      num_leading_axes = request.param
      W_shape = (np.prod(input_shape[num_leading_axes:]), num_units)
      b_shape = (num_units,)
  
      W = Mock()
      b = Mock()
      nonlinearity = Mock()
      W.return_value = np.arange(np.prod(W_shape)).reshape(W_shape)
      b.return_value = np.arange(np.prod(b_shape)).reshape(b_shape) * 3
      layer = DenseLayer(
          dummy_input_layer,
          num_units=num_units,
          num_leading_axes=num_leading_axes,
          W=W,
          b=b,
          nonlinearity=nonlinearity,
      )
  
      return {
          "input_shape": input_shape,
          "num_units": num_units,
          "num_leading_axes": num_leading_axes,
          "W_shape": W_shape,
          "b_shape": b_shape,
          "W": W,
          "b": b,
          "nonlinearity": nonlinearity,
          "layer": layer,
      }
  
imports: from mock import Mock
  import numpy
  import pytest
  import theano
  import lasagne
label_desc: Use image node_id 2 for calling the TestDenseLayer obj's underlying member method code with example usage: obj.layer_vars(request, dummy_input_layer, DenseLayer) and returns: dict