yt.units.unit_object.Unit.factor

Unit.factor(*gens, **args)

See the factor() function in sympy.polys.polytools