code: def test_ground_truth():
      """[Utils] testing: test ground truth for stacking."""
  
      gf = np.array(
          [
              [11.0, 17.0, -14.0, -42.0],
              [15.0, 29.0, -10.0, -30.0],
              [17.64705882, 39.64705882, -2.35294118, -6.35294118],
              [22.35294118, 52.35294118, 2.35294118, 6.35294118],
              [25.0, 63.0, 10.0, 30.0],
              [29.0, 75.0, 14.0, 42.0],
          ]
      )
  
      gwf = np.array(
          [
              [-7.0, 9.0],
              [-3.52941176, 5.88235294],
              [-5.0, 7.0],
              [-5.0, 11.0],
              [-1.52941176, 7.88235294],
              [-3.0, 9.0],
              [1.0, 1.0],
              [1.17647059, 1.17647059],
              [1.0, 1.0],
              [3.0, 3.0],
              [3.17647059, 3.17647059],
              [3.0, 3.0],
          ]
      )
  
      gp = np.array(
          [
              [8.57142857, 14.57142857, -11.42857143, -31.42857143],
              [13.14285714, 27.14285714, -6.85714286, -18.85714286],
              [17.71428571, 39.71428571, -2.28571429, -6.28571429],
              [22.28571429, 52.28571429, 2.28571429, 6.28571429],
              [26.85714286, 64.85714286, 6.85714286, 18.85714286],
              [31.42857143, 77.42857143, 11.42857143, 31.42857143],
          ]
      )
  
      gwp = np.array(
          [
              [-4.0, 6.28571429],
              [-2.0, 8.28571429],
              [1.14285714, 1.14285714],
              [3.14285714, 3.14285714],
          ]
      )
  
      data = Data("stack", False, True, folds=3)
      t, z = data.get_data((6, 2), 2)
      (F, wf), (P, wp) = data.ground_truth(t, z)
  
      np.testing.assert_array_almost_equal(F, gf)
      np.testing.assert_array_almost_equal(wf, gwf)
      np.testing.assert_array_almost_equal(P, gp)
      np.testing.assert_array_almost_equal(wp, gwp)
  
imports: import numpy
  import os
  from mlens.ensemble.base import Layer, Sequential
  from mlens.utils.dummy import OLS, LogisticRegression, Scale
  from mlens.testing.dummy import ESTIMATORS, PREPROCESSING, ESTIMATORS_PROBA, ECM, ECM_PROBA, InitMixin
  from mlens.testing.dummy import Data, EstimatorContainer
  from mlens.utils import assert_correct_format
  from mlens.utils.formatting import _assert_format, _format_instances
  from mlens.utils.exceptions import NotFittedError
  from mlens.externals.sklearn.base import BaseEstimator
label_desc: Use image node_id 16 for calling a global function with example usage: test_ground_truth() without return types