code: def parse(chord):
      
      if len(chord) > 1 and chord[1] in ("b", "#"):
          root = chord[:2]
          rest = chord[2:]
      else:
          root = chord[:1]
          rest = chord[1:]
      check_note(root, chord)
      on_chord_idx = rest.find("/")
      if on_chord_idx >= 0:
          on = rest[on_chord_idx + 1:]
          rest = rest[:on_chord_idx]
          check_note(on, chord)
      else:
          on = None
      if rest in QUALITY_DICT:
          quality = Quality(rest)
      else:
          raise ValueError("Invalid chord {}: Unknown quality {}".format(chord, rest))
      # TODO: Implement parser for appended notes
      appended = []
      return root, quality, appended, on
docs: Parse a string to get chord component
  
      :param str chord: str expression of a chord
      :rtype: (str, pychord.Quality, str, str)
      :return: (root, quality, appended, on)