<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def water(target, temperature='pore.temperature', salinity='pore.salinity'):
 r""" Calculates thermal conductivity of pure water or seawater at atmospheric pressure using the correlation given by Jamieson and Tudhope. Values at temperature higher the normal boiling temperature are calculated at the saturation pressure. Parameters target : OpenPNM Object The object for which these values are being calculated. This controls the length of the calculated array, and also provides access to other necessary thermofluid properties. temperature : string The dictionary key containing the temperature values. Temperature must be in Kelvin for this emperical equation to work salinity : string The dictionary key containing the salinity values. Salinity must be expressed in g of salt per kg of solution (ppt). Returns ------- The thermal conductivity of water/seawater in [W/m.K] Notes ----- T must be in K, and S in g of salt per kg of phase, or ppt (parts per thousand) VALIDITY: 273 < T < 453 K; 0 < S < 160 g/kg; ACCURACY: 3 % References D. T. Jamieson, and J. S. Tudhope, Desalination, 8, 393-401, 1970. """

    T = target[temperature]
    if salinity in target.keys():
        S = target[salinity]
    else:
        S = 0
    T68 = 1.00024*T  # convert from T_90 to T_68
    SP = S/1.00472  # convert from S to S_P
    k_sw = 0.001*(10**(sp.log10(240+0.0002*SP) +
                       0.434*(2.3-(343.5+0.037*SP)/T68) *
                       ((1-T68/(647.3+0.03*SP)))**(1/3)))
    value = k_sw
    return value