<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def play_note(self, note, duration, volume=100, play_type=PLAY_WAIT_FOR_COMPLETE):
 """ Plays a note, given by its name as defined in ``_NOTE_FREQUENCIES``. :param string note: The note symbol with its octave number :param float duration: Tone duration, in seconds :param int volume: The play volume, in percent of maximum volume :param play_type: The behavior of ``play_note`` 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 """

        self._validate_play_type(play_type)
        try:
            freq = self._NOTE_FREQUENCIES.get(note.upper(), self._NOTE_FREQUENCIES[note])
        except KeyError:
            raise ValueError('invalid note (%s)' % note)

        if duration <= 0:
            raise ValueError('invalid duration (%s)' % duration)
        if not 0 < volume <= 100:
            raise ValueError('invalid volume (%s)' % volume)

        return self.play_tone(freq, duration=duration, volume=volume, play_type=play_type)