code: def test_imports():
      """Check that imports produces the correct import blocks."""
      simple_spec_imports = (
          "from sktime.forecasting.naive import NaiveForecaster"
      )
      assert imports(simple_spec) == simple_spec_imports
  
      pipe_imports = (
          "from sktime.forecasting.compose._pipeline import TransformedTargetForecast"
          "er\nfrom sktime.forecasting.exp_smoothing import ExponentialSmoothing\nfrom"
          " sktime.forecasting.model_selection._tune import ForecastingGridSearch"
          "CV\nfrom sktime.forecasting.naive import NaiveForecaster\nfrom sktime.fore"
          "casting.naive import NaiveForecaster\nfrom sktime.forecasting.theta impor"
          "t ThetaForecaster\nfrom sktime.split.expandingwindow import "
          "ExpandingWindowSplitter\nfrom sktime.transformations.series.impute import "
          "Imputer"
      )
      assert imports(pipe_spec) == pipe_imports
  
imports: import pytest
  from sktime.registry._craft import craft, deps, imports
  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_imports() without return types