code: def play_tone(self, frequency, duration, delay=0.0, volume=100,
                    play_type=PLAY_WAIT_FOR_COMPLETE):
          
          self._validate_play_type(play_type)
  
          if duration <= 0:
              raise ValueError('invalid duration (%s)' % duration)
          if delay < 0:
              raise ValueError('invalid delay (%s)' % delay)
          if not 0 < volume <= 100:
              raise ValueError('invalid volume (%s)' % volume)
  
          self.set_volume(volume)
  
          duration_ms = int(duration * 1000)
          delay_ms = int(delay * 1000)
  
          self.tone([(frequency, duration_ms, delay_ms)], play_type=play_type)
docs: Play a single tone, specified by its frequency, duration, volume and final delay.
  
          :param int frequency: the tone frequency, in Hertz
          :param float duration: Tone duration, in seconds
          :param float delay: Delay after tone, in seconds (can be useful when chaining calls to ``play_tone``)
          :param int volume: The play volume, in percent of maximum volume
  
          :param play_type: The behavior of ``play_tone`` once playback has been initiated
          :type play_type: ``Sound.PLAY_WAIT_FOR_COMPLETE``, ``Sound.PLAY_NO_WAIT_FOR_COMPLETE`` or ``Sound.PLAY_LOOP``
  
          :return: When ``Sound.PLAY_NO_WAIT_FOR_COMPLETE`` is specified, returns the PID of the underlying beep command; ``None`` otherwise
  
          :raises ValueError: if invalid parameter