code: def test_pydotprint_cond_highlight():
      # This is a REALLY PARTIAL TEST.
      # I did them to help debug stuff.
  
      # Skip test if pydot is not available.
      if not theano.printing.pydot_imported:
          raise SkipTest("pydot not available")
  
      x = tensor.dvector()
      f = theano.function([x], x * 2)
      f([1, 2, 3, 4])
  
      s = StringIO()
      new_handler = logging.StreamHandler(s)
      new_handler.setLevel(logging.DEBUG)
      orig_handler = theano.logging_default_handler
  
      theano.theano_logger.removeHandler(orig_handler)
      theano.theano_logger.addHandler(new_handler)
      try:
          theano.printing.pydotprint(
              f, cond_highlight=True, print_output_file=False
          )
      finally:
          theano.theano_logger.addHandler(orig_handler)
          theano.theano_logger.removeHandler(new_handler)
  
      assert (
          s.getvalue() == "pydotprint: cond_highlight is set but there"
          " is no IfElse node in the graph\n"
      )
  
imports: from __future__ import absolute_import, print_function, division
  import logging
  from nose.plugins.skip import SkipTest
  import numpy
  from six.moves import StringIO
  import theano
  import theano.tensor
  from theano.printing import min_informative_str, debugprint
label_desc: Use image node_id 1 for calling a global function with example usage: test_pydotprint_cond_highlight() without return types