docs: public static io.opencensus.trace.MessageEvent asMessageEvent(
        io.opencensus.trace.BaseMessageEvent event) {
      Utils.checkNotNull(event, "event");
      if (event instanceof io.opencensus.trace.MessageEvent) {
        return (io.opencensus.trace.MessageEvent) event;
      }
      io.opencensus.trace.NetworkEvent networkEvent = (io.opencensus.trace.NetworkEvent) event;
      io.opencensus.trace.MessageEvent.Type type =
          (networkEvent.getType() == io.opencensus.trace.NetworkEvent.Type.RECV)
              ? io.opencensus.trace.MessageEvent.Type.RECEIVED
              : io.opencensus.trace.MessageEvent.Type.SENT;
      return io.opencensus.trace.MessageEvent.builder(type, networkEvent.getMessageId())
          .setUncompressedMessageSize(networkEvent.getUncompressedMessageSize())
          .setCompressedMessageSize(networkEvent.getCompressedMessageSize())
          .build();
    }