code: def normal_order(expr, recursive_limit=10, _recursive_depth=0):
      """Normal order an expression with bosonic or fermionic operators. Note
      that this normal order is not equivalent to the original expression, but
      the creation and annihilation operators in each term in expr is reordered
      so that the expression becomes normal ordered.
  
      Parameters
      ==========
  
      expr : expression
          The expression to normal order.
  
      recursive_limit : int (default 10)
          The number of allowed recursive applications of the function.
  
      Examples
      ========
  
      >>> from sympy.physics.quantum import Dagger
      >>> from sympy.physics.quantum.boson import BosonOp
      >>> from sympy.physics.quantum.operatorordering import normal_order
      >>> a = BosonOp("a")
      >>> normal_order(a * Dagger(a))
      Dagger(a)*a
      """
      if _recursive_depth > recursive_limit:
          warnings.warn("Too many recursions, aborting")
          return expr
  
      if isinstance(expr, Add):
          return _normal_order_terms(
              expr,
              recursive_limit=recursive_limit,
              _recursive_depth=_recursive_depth,
          )
      elif isinstance(expr, Mul):
          return _normal_order_factor(
              expr,
              recursive_limit=recursive_limit,
              _recursive_depth=_recursive_depth,
          )
      else:
          return expr
  
file_path: sympy/sympy/physics/quantum/operatorordering.py
imports: import warnings
  from sympy.core.add import Add
  from sympy.core.mul import Mul
  from sympy.core.numbers import Integer
  from sympy.core.power import Pow
  from sympy.physics.quantum import Commutator, AntiCommutator
  from sympy.physics.quantum.boson import BosonOp
  from sympy.physics.quantum.fermion import FermionOp
label_desc: Use image node_id 7 for calling a global function with example usage: normal_order(expr, recursive_limit, _recursive_depth) and returns: expr, _normal_order_terms, _normal_order_factor, expr