def rotation(new_rotation=0):
    """Set the display rotation.
    :param new_rotation: Specify the rotation in degrees: 0, 90, 180 or 270"""
    global _rotation
    if new_rotation in [0, 90, 180, 270]:
        _rotation = new_rotation
        return True
    else:
        raise ValueError('Rotation: 0, 90, 180 or 270 degrees only')
