<commit_before>package dependency

// filter is used as a helper for filtering values out of maps.
func filter(data map[string]string, remove []string) map[string]string {
	if data == nil {
		return make(map[string]string)
	}
	for _, k := range remove {
		delete(data, k)
	}
	return data
}

// filterVersionMeta filters out all version information from the returned
// metadata. It allocates the meta map if it is nil to make the tests backward
// compatible with versions < 1.5.2.
func filterVersionMeta(meta map[string]string) map[string]string {
	filteredMeta := []string{
		"raft_version", "serf_protocol_current",
		"serf_protocol_min", "serf_protocol_max", "version",
		"non_voter", "read_replica",
	}
	return filter(meta, filteredMeta)
}

// filterAddresses filters out consul >1.7 ipv4/ipv6 specific entries
// from TaggedAddresses entries on nodes, catlog and health services.
func filterAddresses(addrs map[string]string) map[string]string {
	ipvKeys := []string{"lan_ipv4", "wan_ipv4", "lan_ipv6", "wan_ipv6"}
	return filter(addrs, ipvKeys)
}<commit_msg>ignore new grpc_port field in tests<commit_after>package dependency

// filter is used as a helper for filtering values out of maps.
func filter(data map[string]string, remove []string) map[string]string {
	if data == nil {
		return make(map[string]string)
	}
	for _, k := range remove {
		delete(data, k)
	}
	return data
}

// filterVersionMeta filters out all version information from the returned
// metadata. It allocates the meta map if it is nil to make the tests backward
// compatible with versions < 1.5.2.
func filterVersionMeta(meta map[string]string) map[string]string {
	filteredMeta := []string{
		"raft_version", "serf_protocol_current",
		"serf_protocol_min", "serf_protocol_max", "version",
		"non_voter", "read_replica", "grpc_port",
	}
	return filter(meta, filteredMeta)
}

// filterAddresses filters out consul >1.7 ipv4/ipv6 specific entries
// from TaggedAddresses entries on nodes, catlog and health services.
func filterAddresses(addrs map[string]string) map[string]string {
	ipvKeys := []string{"lan_ipv4", "wan_ipv4", "lan_ipv6", "wan_ipv6"}
	return filter(addrs, ipvKeys)
}
{'fraction_non_alphanumeric': 0.11131639722863741, 'fraction_numerical': 0.010161662817551964, 'mean_word_length': 5.206303724928366, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5979457', 'n_tokens_mistral': 700, 'n_tokens_neox': 697, 'n_words': 218}