code: def test_badthunkoutput():
      # Check if the c and python code is consistent.
      a = theano.tensor.dvector()
      b = theano.tensor.dvector()
  
      f_good = theano.function(
          [a, b],
          off_by_half(a, b),
          mode=debugmode.DebugMode(check_c_code=theano.config.cxx),
      )
      f_inconsistent = theano.function(
          [a, b],
          inconsistent(a, b),
          mode=debugmode.DebugMode(check_c_code=theano.config.cxx),
      )
  
      # this should evaluate with no error
      f_good([1.0, 2.0, 3.0], [2, 3, 4])
      if not theano.config.cxx:
          raise SkipTest(
              "G++ not available, so we need to skip this test."
          )
  
      try:
          f_inconsistent([1.0, 2.0, 3.0], [2, 3, 4])
      except debugmode.BadThunkOutput as e:
          # print repr(e)
          assert e.r.owner.op is inconsistent
          return  # TEST PASS
  
      assert False
  
imports: from __future__ import absolute_import, print_function, division
  import sys
  import unittest
  from nose.plugins.skip import SkipTest
  import numpy
  from six import reraise
  from theano import config
  from theano import gof
  import theano
  from theano.compat import exc_message
  from theano.compile import debugmode
  import theano.tensor
  from theano.tests import unittest_tools
label_desc: Use image node_id 2 for calling a global function with example usage: test_badthunkoutput() without return types