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