<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def winter_rain_ratio(pr, prsn=None, tas=None):
 """Ratio of rainfall to total precipitation during winter The ratio of total liquid precipitation over the total precipitation over the winter months (DJF. If solid precipitation is not provided, then precipitation is assumed solid if the temperature is below 0°C. Parameters pr : xarray.DataArray Mean daily precipitation flux [Kg m-2 s-1] or [mm]. prsn : xarray.DataArray Mean daily solid precipitation flux [Kg m-2 s-1] or [mm]. tas : xarray.DataArray Mean daily temperature [℃] or [K] freq : str Resampling frequency Returns ------- xarray.DataArray Ratio of rainfall to total precipitation during winter months (DJF) """

    ratio = liquid_precip_ratio(pr, prsn, tas, freq='QS-DEC')
    winter = ratio.indexes['time'].month == 12
    return ratio[winter]