code: func assertGetDatagram(le *logpb.LogEntry) *logpb.Datagram {
  	if dg := le.GetDatagram(); dg == nil {
  		panic(
  			errors.Annotate(
  				InvalidStreamType,
  				fmt.Sprintf("got %T, expected *logpb.LogEntry_Datagram", le.Content),
  			).Err(),
  		)
  	} else {
  		return dg
  	}
  }
docs: // assertGetDatagram panics if the passed LogEntry does not contain Datagram data, or returns it.