code: def _subsample(self, X, y):
      MAX_SIZE = 10000
      TRAIN_SIZE = 2500
  
      shuffle = True
      stratify = None
  
      if X.shape[0] > MAX_SIZE:
          if self._ml_task != REGRESSION:
              stratify = y
          X_train, _, y_train, _ = train_test_split(
              X,
              y,
              train_size=MAX_SIZE,
              shuffle=shuffle,
              stratify=stratify,
              random_state=1,
          )
          if self._ml_task != REGRESSION:
              stratify = y_train
  
          X_train, X_test, y_train, y_test = train_test_split(
              X_train,
              y_train,
              train_size=TRAIN_SIZE,
              shuffle=shuffle,
              stratify=stratify,
              random_state=1,
          )
      else:
          if self._ml_task != REGRESSION:
              stratify = y
          train_size = X.shape[0] // 4
          X_train, X_test, y_train, y_test = train_test_split(
              X,
              y,
              train_size=train_size,
              shuffle=shuffle,
              stratify=stratify,
              random_state=1,
          )
  
      return X_train, X_test, y_train, y_test
  
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 7 for calling the GoldenFeaturesTransformer obj's underlying member method code with example usage: obj._subsample(X, y) and returns: X_train,  X_test,  y_train,  y_test