code: def is_exp(var):
      """
      Match a variable with either of the `exp(x)` or `-exp(x)` patterns.
  
      Parameters
      ----------
      var
          The Variable to analyze.
  
      Returns
      -------
      tuple
          A pair (b, x) with `b` a boolean set to True if `var` is of the
          form `-exp(x)` and False if `var` is of the form `exp(x)`. If `var`
          cannot be cast into either form, then return `None`.
  
      """
      neg = False
      neg_info = is_neg(var)
      if neg_info is not None:
          neg = True
          var = neg_info
      if var.owner and var.owner.op == tensor.exp:
          return neg, var.owner.inputs[0]
  
imports: from __future__ import absolute_import, print_function, division
  import warnings
  import numpy
  import theano
  from theano import config, gof, printing, scalar
  from theano.compat import imap
  from theano.printing import pprint
  from theano.tensor import basic
  from theano.tensor import elemwise, opt, NotScalarConstantError
  from theano.tensor.type import values_eq_approx_remove_inf
  from theano.gof.opt import copy_stack_trace
label_desc: Use image node_id 7 for calling a global function with example usage: is_exp(var) and returns: neg,  var