code: def test_lazy_if(self):
      # Tests that lazy if works .. even if the two results have different
      # shapes but the same type (i.e. both vectors, or matrices or
      # whatnot of same dtype)
      x = tensor.vector("x", dtype=self.dtype)
      y = tensor.vector("y", dtype=self.dtype)
      c = tensor.iscalar("c")
      f = theano.function([c, x, y], ifelse(c, x, y), mode=self.mode)
      self.assertFunctionContains1(f, self.get_ifelse(1))
      rng = np.random.RandomState(utt.fetch_seed())
  
      xlen = rng.randint(200)
      ylen = rng.randint(200)
  
      vx = np.asarray(rng.uniform(size=(xlen,)), self.dtype)
      vy = np.asarray(rng.uniform(size=(ylen,)), self.dtype)
  
      assert np.allclose(vx, f(1, vx, vy))
      assert np.allclose(vy, f(0, vx, vy))
  
imports: from __future__ import absolute_import, print_function, division
  import unittest
  import numpy
  from nose.plugins.skip import SkipTest
  from six.moves import reduce
  import theano
  from theano import tensor
  import theano.ifelse
  from theano.ifelse import IfElse, ifelse
  from theano.tests import unittest_tools
label_desc: Use image node_id 2 for calling the test_ifelse obj's underlying member method code with example usage: obj.test_lazy_if() without return types