def get_choices_map(choices):
	""" Returns dict where every index and key are mapped to objects:
	map[index] = map[key] = Choice(...)
	"""
	result = {}
	for choice in choices:
		result[choice.index] = choice
		if choice.key:
			result[choice.key] = choice
	return result