code: def test_target_unsupported():
      """
      Makes sure we raise a proper message to the user,
      when providing not supported data input
      """
      validator = TargetValidator(is_classification=True)
      with pytest.raises(
          ValueError,
          match=r"The dimensionality of the train and test targets",
      ):
          validator.fit(
              np.array([[0, 1, 0], [0, 1, 1]]),
              np.array([[0, 1, 0, 0], [0, 1, 1, 1]]),
          )
      with pytest.raises(
          ValueError,
          match=r"Train and test targets must both have the same dtypes",
      ):
          validator.fit(
              pd.DataFrame({"a": [1, 2, 3]}),
              pd.DataFrame({"a": [True, False, False]}),
          )
      with pytest.raises(
          ValueError, match=r"Provided targets are not supported.*"
      ):
          validator.fit(
              np.array([[0, 1, 2], [0, 3, 4]]),
              np.array([[0, 1, 2, 5], [0, 3, 4, 6]]),
          )
      with pytest.raises(
          ValueError,
          match="Train and test targets must both have the same",
      ):
          validator.fit(
              pd.DataFrame({"string": ["foo"]}),
              pd.DataFrame({"int": [1]}),
          )
      with pytest.raises(
          ValueError,
          match=r"Auto-sklearn only supports Numpy arrays, .*",
      ):
          validator.fit({"input1": 1, "input2": 2})
      with pytest.raises(
          ValueError,
          match=r"arget values cannot contain missing/NaN values",
      ):
          validator.fit(np.array([np.nan, 1, 2]))
      with pytest.raises(
          ValueError,
          match=r"arget values cannot contain missing/NaN values",
      ):
          validator.fit(sparse.csr_matrix(np.array([1, 2, np.nan])))
      with pytest.raises(
          ValueError,
          match=r"TargetValidator must have fit\(\) called first",
      ):
          validator.transform(np.array([1, 2, 3]))
      with pytest.raises(
          ValueError,
          match=r"TargetValidator must have fit\(\) called first",
      ):
          validator.inverse_transform(np.array([1, 2, 3]))
      with pytest.raises(
          ValueError,
          match=r"Multi-dimensional classification is not yet supported",
      ):
          validator._fit(np.array([[1, 2, 3], [1, 5, 6]]))
  
      # Dia/ DOK are not supported as type of target makes calls len on the array
      # which causes TypeError: len() of unsized object. Basically, sparse data as
      # multi-label is the only thing that makes sense in this format.
      with pytest.raises(
          ValueError,
          match=r"The provided data could not be interpreted by Sklearn",
      ):
          validator.fit(sparse.dia_matrix(np.array([1, 2, 3])))
  
      validator.fit(np.array([[0, 1, 0], [0, 1, 1]]))
      with pytest.raises(
          ValueError, match=r"Number of outputs changed from"
      ):
          validator.fit(np.array([0, 1, 0]))
  
imports: import numpy
  import pandas
  import sklearn.datasets
  import sklearn.model_selection
  from pandas.api.types import is_bool_dtype, is_numeric_dtype
  from scipy import sparse
  from sklearn.utils.multiclass import type_of_target
  from autosklearn.data.target_validator import TargetValidator
  import pytest
label_desc: Use image node_id 11 for calling a global function with example usage: test_target_unsupported() without return types