code: def test_varying_mtypes(data, testing_method):
      pipe = Detrender() * ExponentTransformer()
      pipe.fit(X=data)
      result = pipe.transform(X=data)
  
      general_pipeline = Pipeline(
          [
              {
                  "skobject": Detrender(),
                  "name": "detrender",
                  "edges": {"X": "X"},
              },
              {
                  "skobject": ExponentTransformer(),
                  "name": "ExponentTransformer",
                  "edges": {"X": "detrender"},
              },
          ]
      )
  
      general_pipeline.fit(X=data)
      general_pipeline.transform(X=data)
      result_general = general_pipeline.predict(data)
      testing_method(result, result_general)
  
imports: import numpy
  import pandas
  import pytest
  from skbase.utils.dependencies import _check_soft_dependencies
  from sktime.classification.dummy import DummyClassifier
  from sktime.datasets import load_arrow_head, load_longley
  from sktime.forecasting.compose import ForecastX
  from sktime.forecasting.naive import NaiveForecaster
  from sktime.forecasting.sarimax import SARIMAX
  from sktime.pipeline.pipeline import Pipeline
  from sktime.split import temporal_train_test_split
  from sktime.transformations.compose import Id
  from sktime.transformations.series.boxcox import BoxCoxTransformer
  from sktime.transformations.series.detrend import Detrender
  from sktime.transformations.series.difference import Differencer
  from sktime.transformations.series.exponent import ExponentTransformer
  from sktime.transformations.series.lag import Lag
  from sktime.utils._testing.hierarchical import _bottom_hier_datagen, _make_hierarchical
label_desc: Use image node_id 8 for calling a global function with example usage: test_varying_mtypes(data, testing_method) without return types