'Returns time until next maintenance window.
:return:  Time until next maintenance window (or None if no
maintenance windows are scheduled)
:rtype:   :class:`datetime.timedelta` or ``None``'

def _get_time_until_mw(self):

    next_window = self._get_next_maint()
    if (not next_window):
        return None
    now = self._now()
    next_begin = timestamp_to_datetime(next_window['beginTime'])
    return (next_begin - now)
