def satisfy_conditions(A, E, cond): AKey = list(A.keys())[0] EKey = list(E.keys())[0] A = A[AKey] E = E[EKey] if not A or not E: return False if not cond['mu'](A.x[0], E.x[0]): print("Failed Distance Modulus") return False if not cond['Av'](A.x[1], E.x[1]): print("Failed Color Excess") return False if not cond['age'](A.x[2], E.x[2]): print("Failed Age Consistency") return False return True