def METHOD_NAME(self, X, y=None) -> np.ndarray:
    """Compute cluster centers and predict cluster index for each time series.
    Convenience method; equivalent of calling fit(X) followed by predict(X)
    Parameters
    ----------
    X : np.ndarray (2d or 3d array of shape (n_instances, series_length) or shape
        (n_instances, n_channels, series_length)).
        Time series instances to train clusterer and then have indexes each belong
        to return.
    y: ignored, exists for API consistency reasons.
    Returns
    -------
    np.ndarray (1d array of shape (n_instances,))
        Index of the cluster each time series in X belongs to.
    """
    self.fit(X)
    return self.predict(X)