<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_json(cls, data):
 """Create a Wind Condition from a dictionary. Args: data = { "wind_speed": float, "wind_direction": float, "rain": bool, "snow_on_ground": bool} """

        # Check required and optional keys
        optional_keys = {'wind_direction': 0, 'rain': False, 'snow_on_ground': False}
        assert 'wind_speed' in data, 'Required key "wind_speed" is missing!'
        for key, val in optional_keys.items():
            if key not in data:
                data[key] = val

        return cls(data['wind_speed'], data['wind_direction'], data['rain'],
                   data['snow_on_ground'])