code: def test_allow_stack_models(self):
      X = np.random.uniform(size=(100, 2))
      y = np.random.randint(0, 2, size=(100,))
      X[:, 0] = y
      X[:, 1] = -y
  
      automl = AutoML(
          results_path=self.automl_dir,
          total_time_limit=5,
          mode="Compete",
          validation_strategy={
              "validation_type": "kfold",
              "k_folds": 5,
          },
      )
      automl.fit(X, y)
      self.assertTrue(automl._stack_models)
      self.assertTrue(automl.tuner._stack_models)
      self.assertTrue(automl._time_ctrl._is_stacking)
  
file_path: mljar-supervised/tests/tests_automl/test_stack_models_constraints.py
imports: import os
  import unittest
  import tempfile
  import json
  import numpy
  import pandas
  import shutil
  from supervised import AutoML
  from supervised.exceptions import AutoMLException
label_desc: Use image node_id 2 for calling the AutoMLStackModelsConstraintsTest obj's underlying member method code with example usage: obj.test_allow_stack_models() without return types