class_docstr: This layer provides boilerplate for a custom layer that applies a
  simple transformation to the input.
  
  Parameters
  ----------
  incoming : a :class:`Layer` instance or a tuple
      The layer feeding into this layer, or the expected input shape.
  
  function : callable
      A function to be applied to the output of the previous layer.
  
  output_shape : None, callable, tuple, or 'auto'
      Specifies the output shape of this layer. If a tuple, this fixes the
      output shape for any input shape (the tuple can contain None if some
      dimensions may vary). If a callable, it should return the calculated
      output shape given the input shape. If None, the output shape is
      assumed to be the same as the input shape. If 'auto', an attempt will
      be made to automatically infer the correct output shape.
  
  Notes
  -----
  An :class:`ExpressionLayer` that does not change the shape of the data
  (i.e., is constructed with the default setting of ``output_shape=None``)
  is functionally equivalent to a :class:`NonlinearityLayer`.
  
  Examples
  --------
  >>> from lasagne.layers import InputLayer, ExpressionLayer
  >>> l_in = InputLayer((32, 100, 20))
  >>> l1 = ExpressionLayer(l_in, lambda X: X.mean(-1), output_shape='auto')
  >>> l1.output_shape
  (32, 100)
code: def get_output_shape_for(self, input_shape):
      if self._output_shape is None:
          return input_shape
      elif self._output_shape is "auto":
          input_shape = (0 if s is None else s for s in input_shape)
          X = theano.tensor.alloc(0, *input_shape)
          output_shape = self.function(X).shape.eval()
          output_shape = tuple(s if s else None for s in output_shape)
          return output_shape
      else:
          return self._output_shape
  
imports: import theano
  import theano.tensor
  import numpy
  from ..None import init
  from ..None import nonlinearities
  from ..utils import as_tuple, floatX, int_types
  from ..random import get_rng
  from .base import Layer, MergeLayer
  from theano.sandbox.rng_mrg import MRG_RandomStreams
label_desc: Use image node_id 2 for calling the ExpressionLayer obj's underlying member method code with example usage: obj.get_output_shape_for(input_shape) and returns: input_shape, output_shape, self