code: def to_chords(progression, key='C'):
      
      if type(progression) == str:
          progression = [progression]
      result = []
      for chord in progression:
          # strip preceding accidentals from the string
          (roman_numeral, acc, suffix) = parse_string(chord)
  
          # There is no roman numeral parsing, just a simple check. Sorry to
          # disappoint. warning Should throw exception
          if roman_numeral not in numerals:
              return []
  
          # These suffixes don't need any post processing
          if suffix == '7' or suffix == '':
              roman_numeral += suffix
  
              # ahh Python. Everything is a dict.
              r = chords.__dict__[roman_numeral](key)
          else:
              r = chords.__dict__[roman_numeral](key)
              r = chords.chord_shorthand[suffix](r[0])
  
          while acc < 0:
              r = map(notes.diminish, r)
              acc += 1
          while acc > 0:
              r = map(notes.augment, r)
              acc -= 1
          result.append(r)
      return result
docs: Convert a list of chord functions or a string to a list of chords.
  
      Examples:
      >>> to_chords(['I', 'V7'])
      [['C', 'E', 'G'], ['G', 'B', 'D', 'F']]
      >>> to_chords('I7')
      [['C', 'E', 'G', 'B']]
  
      Any number of accidentals can be used as prefix to augment or diminish;
      for example: bIV or #I.
      
      All the chord abbreviations in the chord module can be used as suffixes;
      for example: Im7, IVdim7, etc.
      
      You can combine prefixes and suffixes to manage complex progressions:
      #vii7, #iidim7, iii7, etc.
      
      Using 7 as suffix is ambiguous, since it is classicly used to denote the
      seventh chord when talking about progressions instead of just the
      dominant seventh chord. We have taken the classic route; I7 will get
      you a major seventh chord. If you specifically want a dominanth seventh,
      use Idom7.