def deep_merge(a, b):
	"""
	Deep-merges two dicts, with b overwriting values in a.
	https://stackoverflow.com/a/20666342
	"""
	for key, value in b.items():
		if isinstance(value, dict):
			node = a.setdefault(key, {})
			deep_merge(node, value)
		else:
			a[key] = value
	return a