code: def _expand_powers(factors):
      """
      Helper function for normal_ordered_form and normal_order: Expand a
      power expression to a multiplication expression so that that the
      expression can be handled by the normal ordering functions.
      """
  
      new_factors = []
      for factor in factors.args:
          if (
              isinstance(factor, Pow)
              and isinstance(factor.args[1], Integer)
              and factor.args[1] > 0
          ):
              for n in range(factor.args[1]):
                  new_factors.append(factor.args[0])
          else:
              new_factors.append(factor)
  
      return new_factors
  
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 1 for calling a global function with example usage: _expand_powers(factors) and returns: new_factors