code: func CMSketchToProto(c *CMSketch) *tipb.CMSketch {
  	protoSketch := &tipb.CMSketch{Rows: make([]*tipb.CMSketchRow, c.depth)}
  	for i := range c.table {
  		protoSketch.Rows[i] = &tipb.CMSketchRow{Counters: make([]uint32, c.width)}
  		for j := range c.table[i] {
  			protoSketch.Rows[i].Counters[j] = c.table[i][j]
  		}
  	}
  	for _, dataSlice := range c.topN {
  		for _, dataMeta := range dataSlice {
  			protoSketch.TopN = append(protoSketch.TopN, &tipb.CMSketchTopN{Data: dataMeta.Data, Count: dataMeta.Count})
  		}
  	}
  	protoSketch.DefaultValue = c.defaultValue
  	return protoSketch
  }
docs: // CMSketchToProto converts CMSketch to its protobuf representation.