code: def test_modes(self):
      # Then, build a mode with the same linker, and a modified optimizer
      default_mode = get_default_mode()
      modified_mode = default_mode.including("specialize")
  
      # The following line used to fail, with Python 2.4, in July 2012,
      # because an fgraph was associated to the default linker
      copy.deepcopy(modified_mode)
  
      # More straightforward test
      linker = get_default_mode().linker
      assert not hasattr(linker, "fgraph") or linker.fgraph is None
  
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 TestOldModesProblem obj's underlying member method code with example usage: obj.test_modes() without return types