code: def ensemble_stroke(df_1, y, json_file):
      """
      group of ensembles training function
      :param df_1: dataframe
      :param y: is the target column
      :return compiled ensemble model
      """
      models = []
      scores = []
  
      grad = GradientBoostingClassifier().fit(df_1, y)
      adaboost = AdaBoostClassifier().fit(df_1, y)
      forest = RandomForestClassifier().fit(df_1, y)
      extra = ExtraTreesClassifier().fit(df_1, y)
  
      models.append(grad)
      models.append(adaboost)
      models.append(forest)
      models.append(extra)
  
      for model in models:
          scores.append(accuracy_score(model.predict(df_1), y))
  
      return models[scores.index(max(scores))]
  
imports: from sklearn.tree import DecisionTreeClassifier
  from sklearn import svm
  import numpy
  from sklearn.linear_model import SGDClassifier
  from sklearn.neighbors import KNeighborsClassifier
  from sklearn.ensemble import GradientBoostingClassifier
  from sklearn.ensemble import AdaBoostClassifier
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.neural_network import MLPClassifier
  from sklearn.metrics import accuracy_score
  from sklearn.ensemble import ExtraTreesClassifier
  from sklearn.model_selection import GridSearchCV, RandomizedSearchCV
  import warnings
label_desc: Use image node_id 11 for calling a global function with example usage: ensemble_stroke(df_1, y, json_file) and returns: models