def fit(self, blocks, y=None):
        """
        Fit a k-means clustering model using an ordered sequence of blocks.
        """
        self.kmeans.fit(make_weninger_features(blocks))
        # set the cluster center closest to the origin to exactly (0.0, 0.0)
        self.kmeans.cluster_centers_.sort(axis=0)
        self.kmeans.cluster_centers_[0, :] = np.zeros(2)
        return self
Fit a k-means clustering model using an ordered sequence of blocks.