def _rewrite_inversion(fac, po, g, x):
 (_, s) = _get_coeff_exp(po, x)
 (a, b) = _get_coeff_exp(g.argument, x)
 def tr(l):
  return [(t + (s / b)) for t in l]
 return (powdenest((fac / (a ** (s / b))), polar=True), meijerg(tr(g.an), tr(g.aother), tr(g.bm), tr(g.bother), g.argument))

def _rewrite_inversion ( fac , po , g , x ) : ( _ , s ) = _get_coeff_exp ( po , x ) ( a , b ) = _get_coeff_exp ( g . argument , x ) def tr ( l ) : return [ ( t + ( s / b ) ) for t in l ] return ( powdenest ( ( fac / ( a ** ( s / b ) ) ) , polar = True ) , meijerg ( tr ( g . an ) , tr ( g . aother ) , tr ( g . bm ) , tr ( g . bother ) , g . argument ) )
absorb po == x**s into g .