def find_field(d, candidates):
	"""
	Given a dict and a list of possible keys, find the first key
	which is included into this dict. Throws ValueError if not found.
	"""
	for c in candidates:
		if c in d:
			return c
	raise ValueError(f"Can't find any of: {candidates}")