code: def _parse_dst_start_end(dststr):
      date, *time = dststr.split("/", 1)
      type = date[:1]
      if type == "M":
          n_is_julian = False
          m = re.fullmatch(r"M(\d{1,2})\.(\d).(\d)", date, re.ASCII)
          if m is None:
              raise ValueError(f"Invalid dst start/end date: {dststr}")
          date_offset = tuple(map(int, m.groups()))
          offset = _CalendarOffset(*date_offset)
      else:
          if type == "J":
              n_is_julian = True
              date = date[1:]
          else:
              n_is_julian = False
  
          doy = int(date)
          offset = _DayOffset(doy, n_is_julian)
  
      if time:
          (
              offset.hour,
              offset.minute,
              offset.second,
          ) = _parse_transition_time(time[0])
  
      return offset
  
imports: import bisect
  import calendar
  import collections
  import functools
  import re
  import weakref
  from datetime import datetime, timedelta, tzinfo
  from .None import _common, _tzpath
label_desc: Use image node_id 4 for calling a global function with example usage: _parse_dst_start_end(dststr) and returns: offset