code: def test_modes(self):
      # this is a quick test after the LazyLinker branch merge
      # to check that all the current modes can still be used.
      linker_classes_involved = []
  
      predef_modes = ["FAST_COMPILE", "FAST_RUN", "DEBUG_MODE"]
  
      # Linkers to use with regular Mode
      if config.cxx:
          linkers = [
              "py",
              "c|py",
              "c|py_nogc",
              "vm",
              "vm_nogc",
              "cvm",
              "cvm_nogc",
          ]
      else:
          linkers = ["py", "c|py", "c|py_nogc", "vm", "vm_nogc"]
      modes = predef_modes + [
          Mode(linker, "fast_run") for linker in linkers
      ]
  
      for mode in modes:
          x = matrix()
          y = vector()
          f = function([x, y], x + y, mode=mode)
          # test that it runs something
          f([[1, 2], [3, 4]], [5, 6])
          linker_classes_involved.append(f.maker.mode.linker.__class__)
          # print 'MODE:', mode, f.maker.mode.linker, 'stop'
  
      # regression check:
      # there should be
      # - `VMLinker`
      # - OpWiseCLinker (FAST_RUN)
      # - PerformLinker (FAST_COMPILE)
      # - DebugMode's Linker  (DEBUG_MODE)
      assert 4 == len(set(linker_classes_involved))
  
file_path: pytensor/tests/compile/test_mode.py
imports: import copy
  import pytest
  from pytensor.compile.function import function
  from pytensor.compile.mode import AddFeatureOptimizer, Mode, get_default_mode, get_target_language
  from pytensor.configdefaults import config
  from pytensor.graph.features import NoOutputFromInplace
  from pytensor.graph.rewriting.db import RewriteDatabaseQuery, SequenceDB
  from pytensor.link.basic import LocalLinker
  from pytensor.tensor.math import dot, tanh
  from pytensor.tensor.type import matrix, vector
label_desc: Use image node_id 1 for calling the TestBunchOfModes obj's underlying member method code with example usage: obj.test_modes() without return types