def _volume_command(ramp, volume):
    """ Set the value if a volume level is provided, else print the current
    volume level. """
    if volume is not None:
        ramp.set_volume(float(volume))
    else:
        print ramp.volume
def _volume_command ( ramp , volume ) : if volume is not None : ramp . set_volume ( float ( volume ) ) else : print ramp . volume
Set the value if a volume level is provided, else print the current
    volume level.