def calculate_cluster_centroid(self, solution_cluster):
        """
        Calculate the centroid for a given cluster of solutions.
        :param solution_cluster: List of solutions in the cluster
        :return: Cluster centroid
        """
        # Get number of variable shape
        try:
            n_vars = len(solution_cluster[0])
        except TypeError:
            solution_cluster = np.array(solution_cluster)
            return solution_cluster.tolist()

        # TODO: this is lazy garbage fix whats coming in
        cluster = []
        for i in range(len(solution_cluster)):
            # cluster.append(solution_cluster[i].tolist())
            cluster.append(solution_cluster[i])
        solution_cluster = np.asarray(cluster)

        # Get number of solutions
        length = solution_cluster.shape[0]

        centroid_points = []

        # calculate centroid for each variable, by taking mean of every variable of cluster
        for i in range(n_vars):
            # calculate sum over cluster
            centroid_points.append(np.sum(solution_cluster[:, i]))

        return [x / length for x in centroid_points]

        Calculate the centroid for a given cluster of solutions.
        :param solution_cluster: List of solutions in the cluster
        :return: Cluster centroid
        
pymoo/algorithms/moo/kgb.py