<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_lonlats(self, navid, nav_info, lon_out=None, lat_out=None):
 """Load an area. """

        lon_key = 'lon'
        valid_min = self[lon_key + '/attr/valid_min']
        valid_max = self[lon_key + '/attr/valid_max']

        lon_out.data[:] = self[lon_key][::-1]
        lon_out.mask[:] = (lon_out < valid_min) | (lon_out > valid_max)

        lat_key = 'lat'
        valid_min = self[lat_key + '/attr/valid_min']
        valid_max = self[lat_key + '/attr/valid_max']
        lat_out.data[:] = self[lat_key][::-1]
        lat_out.mask[:] = (lat_out < valid_min) | (lat_out > valid_max)

        return {}