code: def test_fermionoperator():
      c = FermionOp("c")
      d = FermionOp("d")
  
      assert isinstance(c, FermionOp)
      assert isinstance(Dagger(c), FermionOp)
  
      assert c.is_annihilation
      assert not Dagger(c).is_annihilation
  
      assert FermionOp("c") == FermionOp("c", True)
      assert FermionOp("c") != FermionOp("d")
      assert FermionOp("c", True) != FermionOp("c", False)
  
      assert AntiCommutator(c, Dagger(c)).doit() == 1
  
      assert (
          AntiCommutator(c, Dagger(d)).doit()
          == c * Dagger(d) + Dagger(d) * c
      )
  
file_path: sympy/sympy/physics/quantum/tests/test_fermion.py
imports: from pytest import raises
  import sympy
  from sympy.physics.quantum import Dagger, AntiCommutator, qapply
  from sympy.physics.quantum.fermion import FermionOp
  from sympy.physics.quantum.fermion import FermionFockKet, FermionFockBra
  from sympy import Symbol
label_desc: Use image node_id 1 for calling a global function with example usage: test_fermionoperator() without return types