code: func (c *InternalClient) marshalImportPayload(index, field string, shard uint64, bits []pilosa.Bit) ([]byte, error) {
  	// Separate row and column IDs to reduce allocations.
  	rowIDs := Bits(bits).RowIDs()
  	rowKeys := Bits(bits).RowKeys()
  	columnIDs := Bits(bits).ColumnIDs()
  	columnKeys := Bits(bits).ColumnKeys()
  	timestamps := Bits(bits).Timestamps()
  
  	// Marshal data to protobuf.
  	buf, err := c.serializer.Marshal(&pilosa.ImportRequest{
  		Index:      index,
  		Field:      field,
  		Shard:      shard,
  		RowIDs:     rowIDs,
  		RowKeys:    rowKeys,
  		ColumnIDs:  columnIDs,
  		ColumnKeys: columnKeys,
  		Timestamps: timestamps,
  	})
  	if err != nil {
  		return nil, fmt.Errorf("marshal import request: %s", err)
  	}
  	return buf, nil
  }
docs: // marshalImportPayload marshalls the import parameters into a protobuf byte slice.