code: func getDatagramWriter(c context.Context, desc *logpb.LogStreamDescriptor) renderer.DatagramWriter {
  
  	return func(w io.Writer, dg []byte) bool {
  		var pb proto.Message
  		switch desc.ContentType {
  		case milo.ContentTypeAnnotations:
  			mp := milo.Step{}
  			if err := proto.Unmarshal(dg, &mp); err != nil {
  				log.WithError(err).Errorf(c, "Failed to unmarshal datagram data.")
  				return false
  			}
  			pb = &mp
  
  		default:
  			return false
  		}
  
  		if err := proto.MarshalText(w, pb); err != nil {
  			log.WithError(err).Errorf(c, "Failed to marshal datagram as text.")
  			return false
  		}
  
  		return true
  	}
  }
docs: // getDatagramWriter returns a datagram writer function that can be used as a
  // Renderer's DatagramWriter. The writer is bound to desc.