code: def test_hierarchy_ensemble_exog(forecasters):
      """Check exog variable functionality."""
      y = _make_hierarchical(
          hierarchy_levels=(2, 4),
          n_columns=2,
          min_timepoints=24,
          max_timepoints=24,
          index_type="period",
      )
  
      y_train = get_window(y, lag=2)
      y_test = get_window(y, window_length=2)
  
      X = _make_hierarchical(
          hierarchy_levels=(2, 4),
          n_columns=2,
          min_timepoints=24,
          max_timepoints=24,
          index_type="period",
      )
      X.columns = ["foo", "bar"]
  
      X_train = get_window(X, lag=2)
      X_test = get_window(X, window_length=2)
  
      estimator_instance = HierarchyEnsembleForecaster(
          forecasters=forecasters, default=NaiveForecaster()
      )
      estimator_instance.fit(y=y_train, X=X_train, fh=[1, 2, 3])
      estimator_instance.predict(X=X_test)
      estimator_instance.update(y=y_test, X=X_test)
  
file_path: sktime/sktime/forecasting/compose/tests/test_hierarchy_ensemble.py
imports: import numpy
  import pytest
  from sktime.base._meta import flatten
  from sktime.datatypes._utilities import get_window
  from sktime.forecasting.compose import HierarchyEnsembleForecaster
  from sktime.forecasting.naive import NaiveForecaster
  from sktime.forecasting.trend import PolynomialTrendForecaster, TrendForecaster
  from sktime.transformations.hierarchical.aggregate import Aggregator
  from sktime.utils._testing.hierarchical import _bottom_hier_datagen, _make_hierarchical
  from sktime.utils.validation._dependencies import _check_soft_dependencies
label_desc: Use image node_id 3 for calling a global function with example usage: test_hierarchy_ensemble_exog(forecasters) without return types