<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pint_multiply(da, q, out_units=None):
 """Multiply xarray.DataArray by pint.Quantity. Parameters da : xr.DataArray Input array. q : pint.Quantity Multiplicating factor. out_units : str Units the output array should be converted into. """

    a = 1 * units2pint(da)
    f = a * q.to_base_units()
    if out_units:
        f = f.to(out_units)
    out = da * f.magnitude
    out.attrs['units'] = pint2cfunits(f.units)
    return out