<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fetch_keywords(codedata) : 	""" Fetch keywords by shaman.KeywordFetcher 		Get average probabilities of keyword and language 	"""


	# Read row in codedata and count keywords in codes with langauge
	tmp = {}
	language_counts = {}

	for index, (language, code) in enumerate(codedata) :
		if language not in shaman.SUPPORTING_LANGUAGES :
			continue

		if language not in tmp :
			tmp[language] = {}
			language_counts[language] = 0

		language_counts[language] += 1

		for keyword in shaman.KeywordFetcher.fetch( code ) :
			# if keyword exists in fetched data, add '1' to keyword data
			tmp[language][keyword] = tmp[language].get(keyword, 0) + 1

		print('Fetch keyword %d/%d    ' % (index, len(codedata)), end='\r')


	# Get dataset indexed by keyword
	ret = {}

	for language in tmp :
		for keyword, count in tmp[ language ].items() :	
			if keyword not in ret :
				ret[ keyword ] = {}

			ret[ keyword ][ language ] = (count / language_counts[ language ]) # Probability

	print('Fetch keyword completed        ')
	return ret