<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def notes_to_positions(notes, root):
 """ Get notes positions. ex) notes_to_positions(["C", "E", "G"], "C") -> [0, 4, 7] :param list[str] notes: list of notes :param str root: the root note :rtype: list[int] :return: list of note positions """

    root_pos = note_to_val(root)
    current_pos = root_pos
    positions = []
    for note in notes:
        note_pos = note_to_val(note)
        if note_pos < current_pos:
            note_pos += 12 * ((current_pos - note_pos) // 12 + 1)
        positions.append(note_pos - root_pos)
        current_pos = note_pos
    return positions