code: def test_cache_types_distinct():
      """
      Test that symbol-like objects of different types (Symbol, MatrixSymbol,
      AppliedUndef) are distinguished by the cache even if they have the same
      name.
      """
      symbols = [sy.Symbol("f_t"), sy.MatrixSymbol("f_t", 4, 4), f_t]
  
      cache = {}  # Single shared cache
      printed = {}
  
      for s in symbols:
          st = theano_code_(s, cache=cache)
          assert st not in printed.values()
          printed[s] = st
  
      # Check all printed objects are distinct
      assert len(set(map(id, printed.values()))) == len(symbols)
  
      # Check retrieving
      for s, st in printed.items():
          with warns_deprecated_sympy():
              assert theano_code(s, cache=cache) is st
  
imports: import logging
  from sympy.external import import_module
  from sympy.testing.pytest import raises, SKIP, warns_deprecated_sympy
  import sympy
  from sympy.core.singleton import S
  from sympy.abc import x, y, z, t
  from sympy.printing.theanocode import theano_code, dim_handling, theano_function
label_desc: Use image node_id 39 for calling a global function with example usage: test_cache_types_distinct() without return types