code: def check_supervised_y_2d(name, estimator_orig):
      tags = estimator_orig._get_tags()
      X, y = _create_small_ts_dataset()
      if tags["binary_only"]:
          X = X[y != 2]
          y = y[y != 2]
  
      estimator = clone(estimator_orig)
      set_random_state(estimator)
      # fit
      estimator.fit(X, y)
      y_pred = estimator.predict(X)
  
      set_random_state(estimator)
      # Check that when a 2D y is given, a DataConversionWarning is
      # raised
      with warnings.catch_warnings(record=True) as w:
          warnings.simplefilter("always", DataConversionWarning)
          warnings.simplefilter("ignore", RuntimeWarning)
          estimator.fit(X, y[:, np.newaxis])
      y_pred_2d = estimator.predict(X)
      msg = "expected 1 DataConversionWarning, got: %s" % (
          ", ".join([str(w_x) for w_x in w])
      )
  
      if not tags["multioutput"] and name not in ["TimeSeriesSVR"]:
          # check that we warned if we don't support multi-output
          assert len(w) > 0, msg
          assert (
              "DataConversionWarning('A column-vector y"
              " was passed when a 1d array was expected" in msg
          )
          assert_allclose(y_pred.ravel(), y_pred_2d.ravel())
  
imports: from tslearn.generators import random_walk_blobs
  from tslearn.preprocessing import TimeSeriesScalerMeanVariance
  import sklearn
  import warnings
  from sklearn.base import clone
  from sklearn.base import is_classifier, is_outlier_detector, is_regressor
  from sklearn.base import ClusterMixin
  from sklearn.exceptions import DataConversionWarning
  from sklearn.datasets import make_blobs
  from sklearn.metrics.pairwise import rbf_kernel, linear_kernel, pairwise_distances
  from sklearn.utils import shuffle
  from sklearn.utils.estimator_checks import check_classifiers_predictions, check_fit2d_1sample, check_fit2d_1feature, check_fit1d, check_get_params_invariance, check_set_params, check_dict_unchanged, check_dont_overwrite_parameters, check_estimators_data_not_an_array, check_fit2d_predict1d, check_methods_subset_invariance, check_regressors_int
  from sklearn.exceptions import SkipTestWarning
  from sklearn.utils.estimator_checks import _yield_classifier_checks, _yield_regressor_checks, _yield_transformer_checks, _yield_clustering_checks, _yield_outliers_checks, _is_pairwise_metric
  from sklearn.metrics import adjusted_rand_score, accuracy_score
  from sklearn.model_selection import ShuffleSplit
  from sklearn.model_selection._validation import _safe_split
  from sklearn.pipeline import make_pipeline
  from tslearn.clustering import TimeSeriesKMeans
  import warnings
  import numpy
label_desc: Use image node_id 12 for calling a global function with example usage: check_supervised_y_2d(name, estimator_orig) without return types