human
Write me a the Python program you requested given the following:
Complete the below
def convert_to(expr, target_units):

    ''''Convert ``expr`` to the same expression with all of its units and quantities
    represented as factors of ``target_units``, whenever the dimension is compatible.
    ``target_units`` may be a single unit/quantity, or a collection of
    units/quantities.
    Examples
    >>> from sympy.physics.units import speed_of_light, meter, gram, second, day
    >>> from sympy.physics.units import mile, newton, kilogram, atomic_mass_constant
    >>> from sympy.physics.units import kilometer, centimeter
    >>> from sympy.physics.units import convert_to
    >>> convert_to(mile, kilometer)
    25146*kilometer/15625
    >>> convert_to(mile, kilometer).n()
    1.609344*kilometer
    >>> convert_to(speed_of_light, meter/second)
    299792458*meter/second
    >>> convert_to(day, second)
    86400*second
    >>> 3*newton
    3*newton
    >>> convert_to(3*newton, kilogram*meter/second**2)
    3*kilogram*meter/second**2
    >>> convert_to(atomic_mass_constant, gram)
    1.66053904e-24*gram
    Conversion to multiple units:
    >>> convert_to(speed_of_light, [meter, second])
    299792458*meter/second
    >>> convert_to(3*newton, [centimeter, gram, second])
    300000*centimeter*gram/second**2
    Conversion to Planck units:
    >>> from sympy.physics.units import gravitational_constant, hbar
    >>> convert_to(atomic_mass_constant, [gravitational_constant, speed_of_light, hbar]).n()
    7.62950196312651e-20*gravitational_constant**(-0.5)*hbar**0.5*speed_of_light**0.5'
    '''
assistant
#Here is the Python program you requested.
    if (not isinstance(target_units, (collections.Iterable, Tuple))):
        target_units = [target_units]
    if isinstance(expr, Add):
        return Add.fromiter((convert_to(i, target_units) for i in expr.args))
    expr = sympify(expr)
    if ((not isinstance(expr, Quantity)) and expr.has(Quantity)):
        expr = expr.replace((lambda x: isinstance(x, Quantity)), (lambda x: x.convert_to(target_units)))
    def get_total_scale_factor(expr):
        if isinstance(expr, Mul):
            return reduce((lambda x, y: (x * y)), [get_total_scale_factor(i) for i in expr.args])
        elif isinstance(expr, Pow):
            return (get_total_scale_factor(expr.base) ** expr.exp)
        elif isinstance(expr, Quantity):
            return expr.scale_factor
        return expr
    depmat = _get_conversion_matrix_for_expr(expr, target_units)
    if (depmat is None):
        return expr
    expr_scale_factor = get_total_scale_factor(expr)
    return (expr_scale_factor * Mul.fromiter(((((1 / get_total_scale_factor(u)) * u) ** p) for (u, p) in zip(target_units, depmat))))