code: def fit(self, X, y):
      if self._new_features:
          return
      if self._error is not None and self._error:
          raise AutoMLException(
              "Golden Features not created due to error (please check errors.md). "
              + self._error
          )
          return
      if X.shape[1] == 0:
          self._error = f"Golden Features not created. No continous features. Input data shape: {X.shape}, {y.shape}"
          self.save()
          raise AutoMLException(
              "Golden Features not created. No continous features."
          )
  
      start_time = time.time()
      combinations = itertools.combinations(X.columns, r=2)
      items = [i for i in combinations]
      if len(items) > 250000:
          si = np.random.choice(len(items), 250000, replace=False)
          items = [items[i] for i in si]
  
      X_train, X_test, y_train, y_test = self._subsample(X, y)
  
      for i in range(len(items)):
          items[i] += (X_train, y_train, X_test, y_test, self._scorer)
  
      scores = []
      # parallel version
      scores = Parallel(n_jobs=self._n_jobs, backend="loky")(
          delayed(get_score)(i) for i in items
      )
  
      # single process version
      # for item in items:
      #    scores += [get_score(item)]
  
      if not scores:
          self._error = f"Golden Features not created. Empty scores. Input data shape: {X.shape}, {y.shape}"
          self.save()
          raise AutoMLException(
              "Golden Features not created. Empty scores."
          )
  
      result = []
      for i in range(len(items)):
          if scores[i][0] is not None:
              result += [
                  (items[i][0], items[i][1], "diff", scores[i][0])
              ]
          if scores[i][1] is not None:
              result += [
                  (items[i][0], items[i][1], "ratio", scores[i][1])
              ]
          if scores[i][2] is not None:
              result += [
                  (items[i][1], items[i][0], "ratio", scores[i][2])
              ]
          if scores[i][3] is not None:
              result += [
                  (items[i][1], items[i][0], "sum", scores[i][3])
              ]
          if scores[i][4] is not None:
              result += [
                  (items[i][1], items[i][0], "multiply", scores[i][4])
              ]
  
      df = pd.DataFrame(
          result, columns=["feature1", "feature2", "operation", "score"]
      )
      df.sort_values(by="score", inplace=True)
  
      new_cols_cnt = np.min([100, np.max([10, int(0.1 * X.shape[1])])])
  
      if (
          self._features_count is not None
          and self._features_count > 0
          and self._features_count < df.shape[0]
      ):
          new_cols_cnt = self._features_count
  
      print(self._features_count, new_cols_cnt)
      self._new_features = json.loads(
          df.head(new_cols_cnt).to_json(orient="records")
      )
  
      for new_feature in self._new_features:
          new_col = "_".join(
              [
                  new_feature["feature1"],
                  new_feature["operation"],
                  new_feature["feature2"],
              ]
          )
          self._new_columns += [new_col]
          print(f"Add Golden Feature: {new_col}")
  
      self.save()
  
      print(
          f"Created {len(self._new_features)} Golden Features in {np.round(time.time() - start_time,2)} seconds."
      )
  
imports: import datetime
  import itertools
  import json
  import os
  import time
  import numpy
  import pandas
  from joblib import Parallel, delayed
  from sklearn.metrics import log_loss, mean_squared_error
  from sklearn.model_selection import train_test_split
  from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor
  from supervised.algorithms.registry import BINARY_CLASSIFICATION, MULTICLASS_CLASSIFICATION, REGRESSION
  from supervised.exceptions import AutoMLException
  from supervised.utils.jsonencoder import MLJSONEncoder
label_desc: Use image node_id 2 for calling the GoldenFeaturesTransformer obj's underlying member method code with example usage: obj.fit(X, y) without return types