<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def join_syllables_spaces(syllables: List[str], spaces: List[int]) -> str: """ Given a list of syllables, and a list of integers indicating the position of spaces, return a string that has a space inserted at the designated points. :param syllables: :param spaces: :return: 'won to tree dun' """

    syllable_line = list("".join(syllables))
    for space in spaces:
        syllable_line.insert(space, " ")
    return "".join(flatten(syllable_line))