def identify_phase_mixture(T=None, P=None, zs=None, Tcs=None, Pcs=None,<EOL>Psats=None, CASRNs=None,<EOL>AvailableMethods=False, Method=None):  
def list_methods():<EOL><INDENT>methods = []<EOL>if Psats and none_and_length_check((Psats, zs)):<EOL><INDENT>methods.append('<STR_LIT>')<EOL><DEDENT>if Tcs and none_and_length_check([Tcs]) and all([T >= i for i in Tcs]):<EOL><INDENT>methods.append('<STR_LIT>')<EOL><DEDENT>if Pcs and none_and_length_check([Pcs]) and all([P >= i for i in Pcs]):<EOL><INDENT>methods.append('<STR_LIT>')<EOL><DEDENT>if Tcs and none_and_length_check([zs, Tcs]) and any([T > Tc for Tc in Tcs]):<EOL><INDENT>methods.append('<STR_LIT>')<EOL><DEDENT>methods.append('<STR_LIT>')<EOL>return methods<EOL><DEDENT>if AvailableMethods:<EOL><INDENT>return list_methods()<EOL><DEDENT>if not Method:<EOL><INDENT>Method = list_methods()[<NUM_LIT:0>]<EOL><DEDENT>xs, ys, phase, V_over_F = None, None, None, None<EOL>if Method == '<STR_LIT>':<EOL><INDENT>Pdew = dew_at_T(zs, Psats)<EOL>Pbubble = bubble_at_T(zs, Psats)<EOL>if P >= Pbubble:<EOL><INDENT>phase = '<STR_LIT:l>'<EOL>ys = None<EOL>xs = zs<EOL>V_over_F = <NUM_LIT:0><EOL><DEDENT>elif P <= Pdew:<EOL><INDENT>phase = '<STR_LIT:g>'<EOL>ys = zs<EOL>xs = None<EOL>V_over_F = <NUM_LIT:1><EOL><DEDENT>elif Pdew < P < Pbubble:<EOL><INDENT>xs, ys, V_over_F = flash(P, zs, Psats)<EOL>phase = '<STR_LIT>'<EOL><DEDENT><DEDENT>elif Method == '<STR_LIT>':<EOL><INDENT>if all([T >= i for i in Tcs]):<EOL><INDENT>phase = '<STR_LIT:g>'<EOL><DEDENT>else: <EOL><INDENT>phase = '<STR_LIT>'<EOL><DEDENT><DEDENT>elif Method == '<STR_LIT>':<EOL><INDENT>if all([P >= i for i in Pcs]):<EOL><INDENT>phase = '<STR_LIT:g>'<EOL><DEDENT>else: <EOL><INDENT>phase = '<STR_LIT>'<EOL><DEDENT><DEDENT>elif Method == '<STR_LIT>':<EOL><INDENT>Psats = list(Psats)<EOL>for i in range(len(Psats)):<EOL><INDENT>if not Psats[i] and Tcs[i] and Tcs[i] <= T:<EOL><INDENT>Psats[i] = <NUM_LIT><EOL><DEDENT><DEDENT>Pdew = dew_at_T(zs, Psats)<EOL>Pbubble = <NUM_LIT><EOL>if P >= Pbubble:<EOL><INDENT>phase = '<STR_LIT:l>'<EOL>ys = None<EOL>xs = zs<EOL>V_over_F = <NUM_LIT:0><EOL><DEDENT>elif P <= Pdew:<EOL><INDENT>phase = '<STR_LIT:g>'<EOL>ys = zs<EOL>xs = None<EOL>V_over_F = <NUM_LIT:1><EOL><DEDENT>elif Pdew < P < Pbubble:<EOL><INDENT>xs, ys, V_over_F = flash(P, zs, Psats)<EOL>phase = '<STR_LIT>'<EOL><DEDENT><DEDENT>elif Method == '<STR_LIT>':<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>return phase, xs, ys, V_over_F<EOL>
>>> identify_phase_mixture(T=280, P=5000., zs=[0.5, 0.5], Psats=[1400, 7000])
('l', [0.5, 0.5], None, 0)
>>> identify_phase_mixture(T=280, P=3000., zs=[0.5, 0.5], Psats=[1400, 7000])
('two-phase', [0.7142857142857143, 0.2857142857142857], [0.33333333333333337, 0.6666666666666666], 0.5625000000000001)
>>> identify_phase_mixture(T=280, P=800., zs=[0.5, 0.5], Psats=[1400, 7000])
('g', None, [0.5, 0.5], 1)
>>> identify_phase_mixture(T=280, P=800., zs=[0.5, 0.5])
(None, None, None, None)