<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ideal_gas(target, pressure='pore.pressure', temperature='pore.temperature'):
 r""" Uses ideal gas law to calculate the molar density of an ideal gas 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 density in kg/m3 pressure : string The dictionary key containing the pressure values in Pascals (Pa) Returns ------- rho, the density in [mol/m3] Notes ----- This method uses the SI value for the ideal gas constant, hence the need to provide the temperature and pressure in SI. In general, OpenPNM use SI throughout for consistency. """

    R = 8.31447
    P = target[pressure]
    T = target[temperature]
    value = P/(R*T)
    return value