<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def tn_max(tasmin, freq='YS'):
 r"""Highest minimum temperature. The maximum of daily minimum temperature. Parameters tasmin : xarray.DataArray Minimum daily temperature [℃] or [K] freq : str, optional Resampling frequency Returns ------- xarray.DataArray Maximum of daily minimum temperature. Notes ----- Let :math:`TN_{ij}` be the minimum temperature at day :math:`i` of period :math:`j`. Then the maximum daily minimum temperature for period :math:`j` is: .. math:: TNx_j = max(TN_{ij}) """


    return tasmin.resample(time=freq).max(dim='time', keep_attrs=True)