def cervix_labels2aggregates(report_labels):
	"""
	Convert the pre-defined labels extracted from cervix reports to coarse- and fine-grained aggregated labels
		Params:
			report_labels (dict(list)): the dict containing for each cervix report the pre-defined labels
		Returns: two dicts containing for each cervix report the set of aggregated labels where 0 = absence and 1 = presence
	"""

	coarse_labels = dict()
	fine_labels = dict()
	# loop over reports
	for rid, rlabels in report_labels.items():
		# assign aggregated labels to current report
		coarse_labels[rid] = {'cancer': 0, 'dysplasia': 0, 'normal': 0}
		fine_labels[rid] = {'cancer_adeno': 0, 'cancer_scc': 0, 'dysplasia': 0, 'glands_norm': 0, 'squamous_norm': 0}
		# update aggregated labels w/ 1 in case of label presence
		if rlabels['cancer_adeno_inv'] == 1 or rlabels['cancer_adeno_insitu'] == 1:
			coarse_labels[rid]['cancer'] = 1
			fine_labels[rid]['cancer_adeno'] = 1
		if rlabels['cancer_scc_inv'] == 1 or rlabels['cancer_scc_insitu'] == 1:
			coarse_labels[rid]['cancer'] = 1
			fine_labels[rid]['cancer_scc'] = 1
		if rlabels['lgd'] == 1 or rlabels['hgd'] == 1:
			coarse_labels[rid]['dysplasia'] = 1
			fine_labels[rid]['dysplasia'] = 1
		if rlabels['glands_norm'] == 1:
			coarse_labels[rid]['normal'] = 1
			fine_labels[rid]['glands_norm'] = 1
		if rlabels['squamous_norm'] == 1:
			coarse_labels[rid]['normal'] = 1
			fine_labels[rid]['squamous_norm'] = 1
	return coarse_labels, fine_labels