def _rewrite1(f, x, recursive=True):
 (fac, po, g) = _split_mul(f, x)
 g = _rewrite_single(g, x, recursive)
 if g:
  return (fac, po, g[0], g[1])

def _rewrite1 ( f , x , recursive = True ) : ( fac , po , g ) = _split_mul ( f , x ) g = _rewrite_single ( g , x , recursive ) if g : return ( fac , po , g [ 0 ] , g [ 1 ] )
try to rewrite f using a single g functions with argument a*x**b .