def flipMultiDict(eDict, fDict):
	""" Make a dict keyed off the values of two dicts

	Args:
		eDict,fDict: Two dictionaries with hashable values

	Returns:
		A dictionary in this form: (eValueSet,fValueSet):key
	"""
	inv = {}
	allKeys = eDict.viewkeys() | fDict.viewkeys()
	for k in allKeys:
		eVal = frozenset(eDict.get(k, ()))
		fVal = frozenset(fDict.get(k, ()))
		inv.setdefault((eVal, fVal), []).append(k)
	return inv