code: def test_ifelse(self):
      config1 = config.profile
      config2 = config.profile_memory
  
      try:
          config.profile = True
          config.profile_memory = True
  
          a, b = scalars("a", "b")
          x, y = scalars("x", "y")
  
          z = ifelse(pt.lt(a, b), x * 2, y * 2)
  
          p = ProfileStats(False, gpu_checks=False)
  
          if config.mode in ("DebugMode", "DEBUG_MODE", "FAST_COMPILE"):
              m = "FAST_RUN"
          else:
              m = None
  
          f_ifelse = function(
              [a, b, x, y], z, profile=p, name="test_ifelse", mode=m
          )
  
          val1 = 0.0
          val2 = 1.0
          big_mat1 = 10
          big_mat2 = 11
  
          f_ifelse(val1, val2, big_mat1, big_mat2)
  
      finally:
          config.profile = config1
          config.profile_memory = config2
  
file_path: pytensor/tests/compile/test_profiling.py
imports: from io import StringIO
  import numpy
  import pytensor.tensor
  from pytensor.compile import ProfileStats
  from pytensor.compile.function import function
  from pytensor.configdefaults import config
  from pytensor.ifelse import ifelse
  from pytensor.tensor.type import fvector, scalars
label_desc: Use image node_id 2 for calling the TestProfiling obj's underlying member method code with example usage: obj.test_ifelse() without return types