code: def test_eval_commutator():
      F = Foo("F")
      B = Bar("B")
      T = Tam("T")
      assert Comm(F, B).doit() == 0
      assert Comm(B, F).doit() == 0
      assert Comm(F, T).doit() == -1
      assert Comm(T, F).doit() == 1
      assert Comm(B, T).doit() == B * T - T * B
      assert Comm(F**2, B).expand(commutator=True).doit() == 0
      assert Comm(F**2, T).expand(commutator=True).doit() == -2 * F
      assert Comm(F, T**2).expand(commutator=True).doit() == -2 * T
      assert Comm(T**2, F).expand(commutator=True).doit() == 2 * T
      assert (
          Comm(T**2, F**3).expand(commutator=True).doit()
          == 2 * F * T * F + 2 * F**2 * T + 2 * T * F**2
      )
  
file_path: sympy/sympy/physics/quantum/tests/test_commutator.py
imports: from sympy.core.numbers import Integer
  from sympy.core.symbol import symbols
  from sympy.physics.quantum.dagger import Dagger
  from sympy.physics.quantum.commutator import Commutator
  from sympy.physics.quantum.operator import Operator
label_desc: Use image node_id 4 for calling a global function with example usage: test_eval_commutator() without return types