def _get_mean_dist(data: list):
    """
    Calculates the average euclidian distance matrix from prior training c-means.

    -----------------------------------------------------------------------------------
    !!! For statistical evaluation !!!
    -----------------------------------------------------------------------------------

    Parameters:
    -----------------------------------------------------------------------------------
    data:               List (ndarray, int)
                        Result from fcm_train().

    Returns:
    -----------------------------------------------------------------------------------
    mean_dist:      2d array, (S, N)
                    Average final Euclidian distance matrix.
    """

    mean_dist = data[0][3] / len(data)  # Starting with the distance matrix of the 1st image

    for i in range(1, len(data)):
        mean_dist += data[i][3] / len(data)  # Adding the distance matrices from all other images

    return mean_dist