code: def fit(self, X, y):
      if self._new_features:
          return
      if self._error is not None and self._error:
          raise AutoMLException(
              "KMeans Features not created due to error (please check errors.md). "
              + self._error
          )
          return
      if X.shape[1] == 0:
          self._error = f"KMeans not created. No continous features. Input data shape: {X.shape}, {y.shape}"
          raise AutoMLException(
              "KMeans Features not created. No continous features."
          )
  
      start_time = time.time()
  
      n_clusters = int(np.log10(X.shape[0]) * 8)
      n_clusters = max(8, n_clusters)
      n_clusters = min(n_clusters, X.shape[1])
  
      self._input_columns = X.columns.tolist()
      # scale data
      self._scale = StandardScaler(
          copy=True, with_mean=True, with_std=True
      )
      X = self._scale.fit_transform(X)
  
      # Kmeans
      self._kmeans = kmeans = MiniBatchKMeans(
          n_clusters=n_clusters, init="k-means++"
      )
      self._kmeans.fit(X)
      self._create_new_features_names()
  
file_path: mljar-supervised/supervised/preprocessing/kmeans_transformer.py
imports: import datetime
  import json
  import os
  import time
  import joblib
  import numpy
  import pandas
  from sklearn.cluster import MiniBatchKMeans
  from sklearn.preprocessing import StandardScaler
  from supervised.exceptions import AutoMLException
label_desc: Use image node_id 2 for calling the KMeansTransformer obj's underlying member method code with example usage: obj.fit(X, y) without return types