<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_notes(self, notes):
 """Feed notes to self.add_note. The notes can either be an other NoteContainer, a list of Note objects or strings or a list of lists formatted like this: or even: """

        if hasattr(notes, 'notes'):
            for x in notes.notes:
                self.add_note(x)
            return self.notes
        elif hasattr(notes, 'name'):
            self.add_note(notes)
            return self.notes
        elif type(notes) == str:
            self.add_note(notes)
            return self.notes
        for x in notes:
            if type(x) == list and len(x) != 1:
                if len(x) == 2:
                    self.add_note(x[0], x[1])
                else:
                    self.add_note(x[0], x[1], x[2])
            else:
                self.add_note(x)
        return self.notes