code: def test_nones_shape(self, func, input_layer_nones, ExpressionLayer):
      input_shape = input_layer_nones.output_shape
      np_shape = tuple(0 if s is None else s for s in input_shape)
      X = np.random.uniform(-1, 1, np_shape)
      expected = func(X)
      expected_shape = tuple(s if s else None for s in expected.shape)
  
      layer = ExpressionLayer(
          input_layer_nones, func, output_shape=expected_shape
      )
      assert layer.get_output_shape_for(input_shape) == expected_shape
  
      def get_shape(input_shape):
          return expected_shape
  
      layer = ExpressionLayer(
          input_layer_nones, func, output_shape=get_shape
      )
      assert layer.get_output_shape_for(input_shape) == expected_shape
  
      layer = ExpressionLayer(
          input_layer_nones, func, output_shape="auto"
      )
      assert layer.get_output_shape_for(input_shape) == expected_shape
  
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 9 for calling the TestExpressionLayer obj's underlying member method code with example usage: obj.test_nones_shape(func, input_layer_nones, ExpressionLayer) and returns: expected_shape