<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fit(self, X, y=None, **kwargs):
 """ Fits n KMeans models where n is the length of ``self.k_values_``, storing the silhouette scores in the ``self.k_scores_`` attribute. The "elbow" and silhouette score corresponding to it are stored in ``self.elbow_value`` and ``self.elbow_score`` respectively. This method finishes up by calling draw to create the plot. """


        self.k_scores_ = []
        self.k_timers_ = []

        if self.locate_elbow:
            self.elbow_value_ = None
            self.elbow_score_ = None

        for k in self.k_values_:
            # Compute the start time for each  model
            start = time.time()

            # Set the k value and fit the model
            self.estimator.set_params(n_clusters=k)
            self.estimator.fit(X)

            # Append the time and score to our plottable metrics
            self.k_timers_.append(time.time() - start)
            self.k_scores_.append(
                self.scoring_metric(X, self.estimator.labels_)
            )    

        if self.locate_elbow:
            locator_kwargs = {
                'distortion': {'curve_nature': 'convex', 'curve_direction': 'decreasing'},
                'silhouette': {'curve_nature': 'concave', 'curve_direction': 'increasing'},
                'calinski_harabaz': {'curve_nature': 'concave', 'curve_direction': 'increasing'},
                }.get(self.metric, {})   
            elbow_locator = KneeLocator(self.k_values_,self.k_scores_,**locator_kwargs)
            self.elbow_value_ = elbow_locator.knee
            if self.elbow_value_ == None:
                warning_message=\
                "No 'knee' or 'elbow' point detected, " \
                "pass `locate_elbow=False` to remove the warning"   
                warnings.warn(warning_message,YellowbrickWarning) 
            else:
                self.elbow_score_ = self.k_scores_[self.k_values_.index(self.elbow_value_)]
                   

        self.draw()

        return self