def brightness(new_brightness):
    """Set the display brightness between 0.0 and 1.0.
        :param new_brightness: Brightness from 0.0 to 1.0 (default 1.0)"""
    global _brightness
    if new_brightness > 1 or new_brightness < 0:
        raise ValueError('Brightness level must be between 0 and 1')
    _brightness = new_brightness
