def METHOD_NAME(self, temperature):
    if temperature < 0.0 or temperature > 40:
        raise ValueError("Temperature must be in range 0-40C")
    else:
        self.temperature = temperature
        self.update_air_density()