<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def can_play_notes(self, notes):
 """Test if the notes lie within the range of the instrument. Return True if so, False otherwise. """

        if hasattr(notes, 'notes'):
            notes = notes.notes
        if type(notes) != list:
            notes = [notes]
        for n in notes:
            if not self.note_in_range(n):
                return False
        return True