<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_chords(self, chords, duration=1):
 """Add chords to the Track. The given chords should be a list of shorthand strings or list of list of shorthand strings, etc. Each sublist divides the value by 2. If a tuning is set, chords will be expanded so they have a proper fingering. Example: """

        tun = self.get_tuning()

        def add_chord(chord, duration):
            if type(chord) == list:
                for c in chord:
                    add_chord(c, duration * 2)
            else:
                chord = NoteContainer().from_chord(chord)
                if tun:
                    chord = tun.find_chord_fingering(chord,
                            return_best_as_NoteContainer=True)
                if not self.add_notes(chord, duration):
                    # This should be the standard behaviour of add_notes
                    dur = self.bars[-1].value_left()
                    self.add_notes(chord, dur)

                    # warning should hold note
                    self.add_notes(chord, value.subtract(duration, dur))

        for c in chords:
            if c is not None:
                add_chord(c, duration)
            else:
                self.add_notes(None, duration)
        return self