code: def test_tensor_product():
      n = Symbol("n")
      hs1 = ComplexSpace(2)
      hs2 = ComplexSpace(n)
  
      h = hs1 * hs2
      assert isinstance(h, TensorProductHilbertSpace)
      assert h.dimension == 2 * n
      assert h.spaces == (hs1, hs2)
  
      h = hs2 * hs2
      assert isinstance(h, TensorPowerHilbertSpace)
      assert h.base == hs2
      assert h.exp == 2
      assert h.dimension == n**2
  
      f = FockSpace()
      h = hs1 * hs2 * f
      assert h.dimension is oo
  
file_path: sympy/sympy/physics/quantum/tests/test_hilbert.py
imports: from sympy.physics.quantum.hilbert import HilbertSpace, ComplexSpace, L2, FockSpace, TensorProductHilbertSpace, DirectSumHilbertSpace, TensorPowerHilbertSpace
  from sympy.core.numbers import oo
  from sympy.core.symbol import Symbol
  from sympy.printing.repr import srepr
  from sympy.printing.str import sstr
  from sympy.sets.sets import Interval
label_desc: Use image node_id 5 for calling a global function with example usage: test_tensor_product() without return types