code: def parse_z(cls, offset):
          
          assert len(offset) == 5, 'Invalid offset string format, must be "+HHMM"'
          return timedelta(hours=int(offset[:3]), minutes=int(offset[0] + offset[3:]))
docs: Parse %z offset into `timedelta`