code: func (p *PreviousGtidsLogEventParser) Parse(raw *RawV4Event) (Event, error) {
  	pgle := &PreviousGtidsLogEvent{
  		Event: raw,
  		set:   make(map[string][]GtidRange),
  	}
  
  	data := raw.VariableLengthData()
  	if len(data) < 8 {
  		return nil, errors.Newf("Not enough bytes for n_sids: %v", data)
  	}
  
  	nSids, data := LittleEndian.Uint64(data[:8]), data[8:]
  	for i := uint64(0); i < nSids; i++ {
  		if len(data) < 16 {
  			return nil, errors.Newf("Not enough bytes for sid: %v", data)
  		}
  
  		var sid string
  		sid, data = string(data[:16]), data[16:]
  		if len(data) < 8 {
  			return nil, errors.Newf("Not enough bytes for n_intervals: %v", data)
  		}
  
  		var nIntervals uint64
  		nIntervals, data = LittleEndian.Uint64(data[:8]), data[8:]
  		for j := uint64(0); j < nIntervals; j++ {
  			if len(data) < 16 {
  				return nil, errors.Newf("Not enough bytes for start/end: %v", data)
  			}
  
  			var start, end uint64
  			start, data = LittleEndian.Uint64(data[:8]), data[8:]
  			end, data = LittleEndian.Uint64(data[:8]), data[8:]
  
  			pgle.set[sid] = append(pgle.set[sid], GtidRange{start, end})
  		}
  	}
  
  	if len(data) > 0 {
  		return nil, errors.Newf("Extra bytes at the end: %v", data)
  	}
  
  	return pgle, nil
  }
docs: // PreviousGtidLogEventParser's Parse processes a raw gtid log event into a PreviousGtidLogEvent.