def METHOD_NAME(
    self, X: np.ndarray, assignment_indexes: np.ndarray
) -> np.ndarray:
    """Compute new centers.
    Parameters
    ----------
    X : np.ndarray (3d array of shape (n_instances, n_dimensions, series_length))
        Time series instances to predict their cluster indexes.
    assignment_indexes: np.ndarray
        Indexes that each time series in X belongs to.
    Returns
    -------
    np.ndarray (3d of shape (n_clusters, n_dimensions, series_length)
        New cluster center values.
    """
    new_centers = np.zeros((self.n_clusters, X.shape[1], X.shape[2]))
    for i in range(self.n_clusters):
        curr_indexes = np.where(assignment_indexes == i)[0]
        distance_matrix = np.zeros((len(curr_indexes), len(curr_indexes)))
        for j in range(len(curr_indexes)):
            curr_j = curr_indexes[j]
            for k in range(len(curr_indexes)):
                distance_matrix[j, k] = self._precomputed_pairwise[
                    curr_j, curr_indexes[k]
                ]
        result = medoids(
            X[curr_indexes], precomputed_pairwise_distance=distance_matrix
        )
        if result.shape[0] > 0:
            new_centers[i, :] = result
    return new_centers