@staticmethod
def _get_transitions_groups(timezonedef):
    from ..recurrence import WEEKDAY_NAMES
    tz_transitions_groups = {}
    transitiongroups = timezonedef.find(('{%s}TransitionsGroups' % TNS))
    if (transitiongroups is not None):
        for transitiongroup in transitiongroups.findall(('{%s}TransitionsGroup' % TNS)):
            tg_id = int(transitiongroup.get('Id'))
            tz_transitions_groups[tg_id] = []
            for transition in transitiongroup.findall(('{%s}Transition' % TNS)):
                (to_year, to_type) = transition.find(('{%s}To' % TNS)).text.rsplit('/', 1)[1].split('-')
                tz_transitions_groups[tg_id].append(dict(to=(int(to_year), to_type)))
            for transition in transitiongroup.findall(('{%s}RecurringDayTransition' % TNS)):
                (to_year, to_type) = transition.find(('{%s}To' % TNS)).text.rsplit('/', 1)[1].split('-')
                occurrence = xml_text_to_value(transition.find(('{%s}Occurrence' % TNS)).text, int)
                if (occurrence == (- 1)):
                    occurrence = 5
                tz_transitions_groups[tg_id].append(dict(to=(int(to_year), to_type), offset=xml_text_to_value(transition.find(('{%s}TimeOffset' % TNS)).text, datetime.timedelta), iso_month=xml_text_to_value(transition.find(('{%s}Month' % TNS)).text, int), iso_weekday=(WEEKDAY_NAMES.index(transition.find(('{%s}DayOfWeek' % TNS)).text) + 1), occurrence=occurrence))
    return tz_transitions_groups
@staticmethod
def _get_transitions_groups(timezonedef):
    from ..recurrence import WEEKDAY_NAMES
    tz_transitions_groups = {}
    transitiongroups = timezonedef.find(('{%s}TransitionsGroups' % TNS))
    if (transitiongroups is not None):
        for transitiongroup in transitiongroups.findall(('{%s}TransitionsGroup' % TNS)):
            tg_id = int(transitiongroup.get('Id'))
            tz_transitions_groups[tg_id] = []
            for transition in transitiongroup.findall(('{%s}Transition' % TNS)):
                (to_year, to_type) = transition.find(('{%s}To' % TNS)).text.rsplit('/', 1)[1].split('-')
                tz_transitions_groups[tg_id].append(dict(to=(int(to_year), to_type)))
            for transition in transitiongroup.findall(('{%s}RecurringDayTransition' % TNS)):
                (to_year, to_type) = transition.find(('{%s}To' % TNS)).text.rsplit('/', 1)[1].split('-')
                occurrence = xml_text_to_value(transition.find(('{%s}Occurrence' % TNS)).text, int)
                if (occurrence == (- 1)):
                    occurrence = 5
                tz_transitions_groups[tg_id].append(dict(to=(int(to_year), to_type), offset=xml_text_to_value(transition.find(('{%s}TimeOffset' % TNS)).text, datetime.timedelta), iso_month=xml_text_to_value(transition.find(('{%s}Month' % TNS)).text, int), iso_weekday=(WEEKDAY_NAMES.index(transition.find(('{%s}DayOfWeek' % TNS)).text) + 1), occurrence=occurrence))
    return tz_transitions_groups