def classify(dt, inst):
	"""Using decision tree dt, return the label for instance inst."""
	
	if dt.is_leaf():
		return dt.fLabel
	value = inst.listAttrs[dt.ixAttr]
	if value not in dt.dictChildren:
		return dt.fDefaultLabel
	return classify(dt.dictChildren[value] , inst)