<commit_before>package mail

import (
	"bytes"
	"mime/multipart"
	"net/textproto"
	"time"
)

// MIMEPart represents a MIME section with headers and message
type MIMEPart struct {
	Headers textproto.MIMEHeader
	Message []byte
}

// NewMIMEPart returns an empty MIME section with headers and message
func NewMIMEPart() MIMEPart {
	part := MIMEPart{}
	part.Headers = make(textproto.MIMEHeader)
	return part
}

func checkedWrite(buffer bytes.Buffer, s string) {
	_, err := buffer.WriteString(s)
	if err != nil {
		panic(err)
	}
}

// ConstructEmail constructs an email to the given recipient consisting of the two MIMEParts
func ConstructEmail(recipient string, parts ...MIMEPart) string {
	var mail bytes.Buffer<commit_msg>Minor doc string correction<commit_after>package mail

import (
	"bytes"
	"mime/multipart"
	"net/textproto"
	"time"
)

// MIMEPart represents a MIME section with headers and message
type MIMEPart struct {
	Headers textproto.MIMEHeader
	Message []byte
}

// NewMIMEPart returns an empty MIME section
func NewMIMEPart() MIMEPart {
	part := MIMEPart{}
	part.Headers = make(textproto.MIMEHeader)
	return part
}

func checkedWrite(buffer bytes.Buffer, s string) {
	_, err := buffer.WriteString(s)
	if err != nil {
		panic(err)
	}
}

// ConstructEmail constructs an email to the given recipient consisting of the given MIMEParts
func ConstructEmail(recipient string, parts ...MIMEPart) string {
	var mail bytes.Buffer
{'fraction_non_alphanumeric': 0.09084556254367575, 'fraction_numerical': 0.0, 'mean_word_length': 4.507692307692308, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3653171', 'n_tokens_mistral': 459, 'n_tokens_neox': 450, 'n_words': 148}