<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def permute(x: SYM, perm: List[int]) -> SYM: """Perumute a vector"""

    x_s = []
    for i in perm:
        x_s.append(x[i])
    return ca.vertcat(*x_s)