def identify_phase(T, P, Tm=None, Tb=None, Tc=None, Psat=None):
if Tm and T <= Tm:<EOL><INDENT>return '<STR_LIT:s>'<EOL><DEDENT>elif Tc and T >= Tc:<EOL><INDENT>return '<STR_LIT:g>'<EOL><DEDENT>elif Psat:<EOL><INDENT>if P <= Psat:<EOL><INDENT>return '<STR_LIT:g>'<EOL><DEDENT>elif P > Psat:<EOL><INDENT>return '<STR_LIT:l>'<EOL><DEDENT><DEDENT>elif Tb:<EOL><INDENT>if <NUM_LIT> < P < <NUM_LIT>:<EOL><INDENT>if T < Tb:<EOL><INDENT>return  '<STR_LIT:l>'<EOL><DEDENT>else:<EOL><INDENT>return '<STR_LIT:g>'<EOL><DEDENT><DEDENT>elif P > <NUM_LIT> and T <= Tb:<EOL><INDENT>return '<STR_LIT:l>'<EOL><DEDENT>else:<EOL><INDENT>return None<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return None<EOL><DEDENT>
r'''Determines the phase of a one-species chemical system according to
    basic rules, using whatever information is available. Considers only the
    phases liquid, solid, and gas; does not consider two-phase
    scenarios, as should occurs between phase boundaries.

    * If the melting temperature is known and the temperature is under or equal
      to it, consider it a solid.
    * If the critical temperature is known and the temperature is greater or
      equal to it, consider it a gas.
    * If the vapor pressure at `T` is known and the pressure is under or equal
      to it, consider it a gas. If the pressure is greater than the vapor
      pressure, consider it a liquid.
    * If the melting temperature, critical temperature, and vapor pressure are
      not known, attempt to use the boiling point to provide phase information.
      If the pressure is between 90 kPa and 110 kPa (approximately normal),
      consider it a liquid if it is under the boiling temperature and a gas if
      above the boiling temperature.
    * If the pressure is above 110 kPa and the boiling temperature is known,
      consider it a liquid if the temperature is under the boiling temperature.
    * Return None otherwise.

    Parameters
    ----------
    T : float
        Temperature, [K]
    P : float
        Pressure, [Pa]
    Tm : float, optional
        Normal melting temperature, [K]
    Tb : float, optional
        Normal boiling point, [K]
    Tc : float, optional
        Critical temperature, [K]
    Psat : float, optional
        Vapor pressure of the fluid at `T`, [Pa]

    Returns
    -------
    phase : str
        Either 's', 'l', 'g', or None if the phase cannot be determined

    Notes
    -----
    No special attential is paid to any phase transition. For the case where
    the melting point is not provided, the possibility of the fluid being solid
    is simply ignored.

    Examples
    --------
    >>> identify_phase(T=280, P=101325, Tm=273.15, Psat=991)
    'l'