def _generic_factor(expr, gens, args, method):
 options.allowed_flags(args, [])
 opt = options.build_options(gens, args)
 return _symbolic_factor(sympify(expr), opt, method)

def _generic_factor ( expr , gens , args , method ) : options . allowed_flags ( args , [ ] ) opt = options . build_options ( gens , args ) return _symbolic_factor ( sympify ( expr ) , opt , method )
helper function for :func:sqf and :func:factor .