code: def get_combinations(models, comb_len=2):
      def _list_in_list_of_lists(list_, list_of_lists):
          for list__ in list_of_lists:
              if set(list_) == set(list__):
                  return True
  
      comb_list = []
      for i in range(0, len(models) + 1):
          for subset in itertools.permutations(models, i):
              if len(subset) < comb_len:
                  continue
              if _list_in_list_of_lists(subset, comb_list):
                  continue
  
              comb_list.append(list(subset))
  
      comb_list_f = []
      for comb_ in comb_list:
  
          def _func_():
              return comb_
  
          _func_.__name__ = str(i) + "___" + str(comb_)
          comb_list_f.append(_func_)
  
      return comb_list_f
  
file_path: Hyperactive/examples/optimization_applications/ensemble_learning_example.py
imports: import itertools
  from sklearn.datasets import load_breast_cancer
  from sklearn.model_selection import cross_val_score
  from mlxtend.classifier import StackingClassifier
  from sklearn.ensemble import GradientBoostingClassifier, RandomForestClassifier, ExtraTreesClassifier
  from sklearn.neighbors import KNeighborsClassifier
  from sklearn.neural_network import MLPClassifier
  from sklearn.gaussian_process import GaussianProcessClassifier
  from sklearn.tree import DecisionTreeClassifier
  from sklearn.naive_bayes import GaussianNB
  from sklearn.linear_model import LogisticRegression
  from sklearn.linear_model import RidgeClassifier
  from hyperactive import Hyperactive
label_desc: Use image node_id 2 for calling a global function with example usage: get_combinations(models, comb_len) and returns: comb_list_f, comb_, True