code: def test_pydotprint_cond_highlight():
      # This is a REALLY PARTIAL TEST.
      # I did them to help debug stuff.
      x = dvector()
      f = pytensor.function([x], x * 2)
      f([1, 2, 3, 4])
  
      s = StringIO()
      new_handler = logging.StreamHandler(s)
      new_handler.setLevel(logging.DEBUG)
      orig_handler = pytensor.logging_default_handler
  
      pytensor.pytensor_logger.removeHandler(orig_handler)
      pytensor.pytensor_logger.addHandler(new_handler)
      try:
          pydotprint(f, cond_highlight=True, print_output_file=False)
      finally:
          pytensor.pytensor_logger.addHandler(orig_handler)
          pytensor.pytensor_logger.removeHandler(new_handler)
  
      assert (
          s.getvalue() == "pydotprint: cond_highlight is set but there"
          " is no IfElse node in the graph\n"
      )
  
imports: import logging
  from io import StringIO
  from textwrap import dedent
  import numpy
  import pytest
  import pytensor
  from pytensor.compile.mode import get_mode
  from pytensor.compile.ops import deep_copy_op
  from pytensor.printing import PatternPrinter, PPrinter, Print, debugprint, default_printer, get_node_by_id, min_informative_str, pp, pydot_imported, pydotprint
  from pytensor.tensor import as_tensor_variable
  from pytensor.tensor.type import dmatrix, dvector, matrix
  from tests.graph.utils import MyInnerGraphOp, MyOp, MyVariable
label_desc: Use image node_id 1 for calling a global function with example usage: test_pydotprint_cond_highlight() without return types