def get_aggregated_metrics(
    tp: np.array, fp: np.array, fn: np.array, support: np.array, zero_division: int = 0
) -> Tuple[np.array, np.array, np.array, np.array]:
    """
    Count precision, recall, f1 scores per-class and with macro,
    weighted and micro average with statistics.

    Args:
        tp: array of shape (num_classes, ) of true positive statistics per class
        fp: array of shape (num_classes, ) of false positive statistics per class
        fn: array of shape (num_classes, ) of false negative statistics per class
        support: array of shape (num_classes, ) of samples count per class
        zero_division: int value, should be one of 0 or 1;
            used for precision and recall computation

    Returns:
        arrays of metrics: per-class, micro, macro, weighted averaging
    """
    num_classes = len(tp)
    precision_values = np.zeros(shape=(num_classes,))
    recall_values = np.zeros(shape=(num_classes,))
    f1_values = np.zeros(shape=(num_classes,))

    for i in range(num_classes):
        precision_values[i] = precision(tp=tp[i], fp=fp[i], zero_division=zero_division)
        recall_values[i] = recall(tp=tp[i], fn=fn[i], zero_division=zero_division)
        f1_values[i] = f1score(
            precision_value=precision_values[i], recall_value=recall_values[i]
        )

    per_class = (
        precision_values,
        recall_values,
        f1_values,
        support,
    )

    macro = (
        precision_values.mean(),
        recall_values.mean(),
        f1_values.mean(),
        None,
    )

    weight = support / support.sum()
    weighted = (
        (precision_values * weight).sum(),
        (recall_values * weight).sum(),
        (f1_values * weight).sum(),
        None,
    )

    micro_precision = precision(tp=tp.sum(), fp=fp.sum(), zero_division=zero_division)
    micro_recall = recall(tp=tp.sum(), fn=fn.sum(), zero_division=zero_division)
    micro = (
        micro_precision,
        micro_recall,
        f1score(precision_value=micro_precision, recall_value=micro_recall),
        None,
    )
    return per_class, micro, macro, weighted

    Count precision, recall, f1 scores per-class and with macro,
    weighted and micro average with statistics.

    Args:
        tp: array of shape (num_classes, ) of true positive statistics per class
        fp: array of shape (num_classes, ) of false positive statistics per class
        fn: array of shape (num_classes, ) of false negative statistics per class
        support: array of shape (num_classes, ) of samples count per class
        zero_division: int value, should be one of 0 or 1;
            used for precision and recall computation

    Returns:
        arrays of metrics: per-class, micro, macro, weighted averaging
    
catalyst/metrics/functional/_classification.py