<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _eq(self, T, P):
 """Procedure for calculate the composition in saturation state Parameters T : float Temperature [K] P : float Pressure [MPa] Returns ------- Asat : float Saturation mass fraction of dry air in humid air [kg/kg] """

        if T <= 273.16:
            ice = _Ice(T, P)
            gw = ice["g"]
        else:
            water = IAPWS95(T=T, P=P)
            gw = water.g

        def f(parr):
            rho, a = parr
            if a > 1:
                a = 1
            fa = self._fav(T, rho, a)
            muw = fa["fir"]+rho*fa["fird"]-a*fa["fira"]
            return gw-muw, rho**2*fa["fird"]/1000-P

        rinput = fsolve(f, [1, 0.95], full_output=True)
        Asat = rinput[0][1]
        return Asat