<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def winddir_text(pts):
    "Convert wind direction from 0..15 to compass point text"
    global _winddir_text_array
    if pts is None:
        return None
    if not isinstance(pts, int):
        pts = int(pts + 0.5) % 16
    if not _winddir_text_array:
        _ = pywws.localisation.translation.ugettext
        _winddir_text_array = (
            _(u'N'), _(u'NNE'), _(u'NE'), _(u'ENE'),
            _(u'E'), _(u'ESE'), _(u'SE'), _(u'SSE'),
            _(u'S'), _(u'SSW'), _(u'SW'), _(u'WSW'),
            _(u'W'), _(u'WNW'), _(u'NW'), _(u'NNW'),
            )
    return _winddir_text_array[pts]