code: def test_single_dataset_single_strategy_against_sklearn(
      dataset, cv, metric_func, estimator, results_cls, tmpdir
  ):
      """Test against sklearn."""
      # set up orchestration
      task = TSCTask(target="class_val")
  
      # create strategies
      clf = make_reduction_pipeline(estimator)
      strategy = TSCStrategy(clf)
  
      # result backend
      if results_cls in [HDDResults]:
          # for hard drive results, create temporary directory using pytest's
          # tmpdir fixture
          tempdir = tmpdir.mkdir("results/")
          path = tempdir.dirpath()
          results = results_cls(path=path)
      elif results_cls in [RAMResults]:
          results = results_cls()
      else:
          raise ValueError()
  
      orchestrator = Orchestrator(
          datasets=[dataset],
          tasks=[task],
          strategies=[strategy],
          cv=cv,
          results=results,
      )
      orchestrator.fit_predict(save_fitted_strategies=False)
  
      evaluator = Evaluator(results)
  
      # create metric classes for evaluation and set metric kwargs
      if metric_func in [accuracy_score]:
          kwargs = {}  # empty kwargs for simple pairwise metrics
          metric = PairwiseMetric(func=metric_func, name="metric")
      elif metric_func in [f1_score]:
          kwargs = {
              "average": "macro"
          }  # set kwargs for composite metrics
          metric = AggregateMetric(
              func=metric_func, name="metric", **kwargs
          )
      else:
          raise ValueError()
  
      metrics = evaluator.evaluate(metric=metric)
      actual = metrics["metric_mean"].iloc[0]
  
      # compare against sklearn cross_val_score
      data = dataset.load()  # load data
      X = data.loc[:, task.features]
      y = data.loc[:, task.target]
      expected = cross_val_score(
          clf, X, y, scoring=make_scorer(metric_func, **kwargs), cv=cv
      ).mean()
  
      # compare results
      np.testing.assert_array_equal(actual, expected)
  
imports: import os
  import numpy
  import pytest
  from sklearn.dummy import DummyClassifier
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.metrics import accuracy_score, f1_score, make_scorer
  from sklearn.model_selection import StratifiedKFold, cross_val_score
  from sklearn.pipeline import Pipeline
  import sktime
  from sktime.benchmarking.data import RAMDataset, UEADataset
  from sktime.benchmarking.evaluation import Evaluator
  from sktime.benchmarking.metrics import AggregateMetric, PairwiseMetric
  from sktime.benchmarking.orchestration import Orchestrator
  from sktime.benchmarking.results import HDDResults, RAMResults
  from sktime.benchmarking.strategies import TSCStrategy
  from sktime.benchmarking.tasks import TSCTask
  from sktime.classification.distance_based import KNeighborsTimeSeriesClassifier
  from sktime.classification.ensemble import ComposableTimeSeriesForestClassifier
  from sktime.datasets import load_arrow_head, load_gunpoint
  from sktime.series_as_features.model_selection import SingleSplit
  from sktime.transformations.panel.reduce import Tabularizer
label_desc: Use image node_id 3 for calling a global function with example usage: test_single_dataset_single_strategy_against_sklearn(dataset, cv, metric_func, estimator, results_cls, tmpdir) without return types