<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_cv_accuracy(res):
 """ Extract the cv accuracy from the model """

    ac_list = [(accuracy["train_acc_final"],
                accuracy["test_acc_final"]
                )
               for accuracy, weights in res]
    ac = np.array(ac_list)

    perf = {
        "mean_train_acc": np.mean(ac[:, 0]),
        "std_train_acc": np.std(ac[:, 0]),
        "mean_test_acc": np.mean(ac[:, 1]),
        "std_test_acc": np.std(ac[:, 1]),

    }
    return perf