<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def calculate_measures(y_pred, y_test):
 """ Calculates the F-scores and F-score averages given a classification result and a ground truth. Inputs: - y_pred: The node-label prediction for the test set in a SciPy sparse CSR matrix format. - y_test: The node-label ground truth for the test set in a SciPy sparse CSR matrix format. Outputs: - measures: A number of NumPy arrays containing evaluation scores for the experiment. """

    y_pred = y_pred.toarray()
    y_test = y_test.toarray()

    macro_precision, macro_recall, macro_F1, macro_support = precision_recall_fscore_support(y_test,
                                                                                             y_pred,
                                                                                             beta=1.0,
                                                                                             average="macro")

    micro_precision, micro_recall, micro_F1, micro_support = precision_recall_fscore_support(y_test,
                                                                                             y_pred,
                                                                                             beta=1.0,
                                                                                             average="micro")

    F1 = f1_score(y_test,
                  y_pred,
                  average=None)

    measures = [macro_recall, micro_recall, macro_precision, micro_precision, macro_F1, micro_F1, F1]
    return measures