<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def svd(a, i=None) -> tuple: """Singular Value Decomposition. Factors the matrix `a` as ``u * np.diag(s) * v``, where `u` and `v` are unitary and `s` is a 1D array of `a`'s singular values. Parameters a : array_like Input array. i : int or slice (optional) What singular value "slice" to return. Default is None which returns unitary 2D arrays. Returns ------- tuple Decomposed arrays in order `u`, `v`, `s` """

    u, s, v = np.linalg.svd(a, full_matrices=False, compute_uv=True)
    u = u.T
    if i is None:
        return u, v, s
    else:
        return u[i], v[i], s[i]