code: def is_equal(var, val):
      """
      Returns True if `var` is always equal to `val`.
  
      This will only return True if the variable will always be equal to
      the value.  If it might not be true in some cases then it returns False.
  
      Parameters
      ----------
      var
          Variable to compare
      val
          Python value
  
      """
      try:
          v = get_scalar_constant_value(var)
          return v == val
      except NotScalarConstantError:
          return False
  
file_path: Theano/theano/gpuarray/opt_util.py
imports: from __future__ import absolute_import, print_function, division
  from functools import wraps
  import numpy
  from theano import tensor, scalar, Constant
  from theano.gof import local_optimizer
  from theano.gof.opt import inherit_stack_trace
  from theano.tensor import DimShuffle, get_scalar_constant_value, NotScalarConstantError
  from .basic_ops import GpuFromHost, HostFromGpu, GpuAllocEmpty, GpuReshape
  from .elemwise import GpuDimShuffle, GpuElemwise
label_desc: Use image node_id 3 for calling a global function with example usage: is_equal(var, val) and returns: unknown, False