code: def as_theano_expression(input):
      """Wrap as Theano expression.
  
      Wraps the given input as a Theano constant if it is not
      a valid Theano expression already. Useful to transparently
      handle numpy arrays and Python scalars, for example.
  
      Parameters
      ----------
      input : number, numpy array or Theano expression
          Expression to be converted to a Theano constant.
  
      Returns
      -------
      Theano symbolic constant
          Theano constant version of `input`.
      """
      if isinstance(input, theano.gof.Variable):
          return input
      else:
          try:
              return theano.tensor.constant(input)
          except Exception as e:
              raise TypeError(
                  "Input of type %s is not a Theano expression and "
                  "cannot be wrapped as a Theano constant (original "
                  "exception: %s)" % (type(input), e)
              )
  
file_path: Lasagne/lasagne/utils.py
imports: import numbers
  import numpy
  import theano
  import theano.tensor
label_desc: Use image node_id 3 for calling a global function with example usage: as_theano_expression(input) and returns: input, theano