def replace_dict(d0, d1):
	"""
	Returns a dictionary whose keys are the intersection of d0 and d1, and
	whose values are from d1.
	"""
	ret = {}
	
	for (name, val) in d1.items():
		if name in d0.keys():
				ret[name] = val
		
	return ret