code: def test_ifelse():
      a = T.scalar()
      b = generic()
      c = generic()
  
      notimpl = NotImplementedOp()
      lazys = [True]
      # We need lazy to end up being True for this test.
      if theano.config.vm.lazy in [True, None]:
          lazys = [True, None]
      cloops = [True, False]
      if theano.config.cxx == "":
          cloops = [False]
      for cloop in cloops:
          for lazy in lazys:
              linker = theano.gof.vm.VM_Linker(
                  use_cloop=cloop, lazy=lazy
              )
              f = function(
                  [a, b, c],
                  ifelse(a, notimpl(b), c),
                  mode=Mode(linker=linker, optimizer="fast_run"),
              )
  
              try:
                  # print "case 1"
                  f(1, "a", "b")
                  assert False
              except NotImplementedOp.E:
                  pass
              # print "... passed"
  
              # print "case 2"
              # print f(0, 'a', 'b')
              assert f(0, "a", "b") == "b"
  
imports: from __future__ import absolute_import, print_function, division
  from copy import deepcopy
  import numpy
  import theano
  from theano.gof.op import PureOp
  from theano.gof import Apply, generic
  from theano import function, Mode
  from theano.ifelse import ifelse
  import theano.tensor
label_desc: Use image node_id 1 for calling a global function with example usage: test_ifelse() without return types