def _compute_deviations(counts, middle_value):
	"""
	For each count, compute the deviation (distance) between it and some value.

	:counts: The list of counts.
	:middle_value: The value used to compute the deviations.
	:return: A list of deviations.
	"""

	# For each count, compute the deviation (distance) between it and 'middle_value'.
	deviations = [abs(count - middle_value) for count in counts]

	return deviations