code: def summary(self):
          
          if self.hasSummary:
              return KMeansSummary(super(KMeansModel, self).summary)
          else:
              raise RuntimeError("No training summary available for this %s" %
                                 self.__class__.__name__)
docs: Gets summary (e.g. cluster assignments, cluster sizes) of the model trained on the
          training set. An exception is thrown if no summary exists.