code: def test_transform_target_regressor_ensure_y_array():
      # check that the target ``y`` passed to the transformer will always be a
      # numpy array. Similarly, if ``X`` is passed as a list, we check that the
      # predictor receive as it is.
      X, y = friedman
      tt = TransformedTargetRegressor(
          transformer=DummyCheckerArrayTransformer(),
          regressor=DummyCheckerListRegressor(),
          check_inverse=False,
      )
      tt.fit(X.tolist(), y.tolist())
      tt.predict(X.tolist())
      with pytest.raises(AssertionError):
          tt.fit(X, y.tolist())
      with pytest.raises(AssertionError):
          tt.predict(X)
  
imports: import numpy
  import pytest
  from sklearn import datasets
  from sklearn.base import BaseEstimator, TransformerMixin, clone
  from sklearn.compose import TransformedTargetRegressor
  from sklearn.dummy import DummyRegressor
  from sklearn.linear_model import LinearRegression, OrthogonalMatchingPursuit
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import FunctionTransformer, StandardScaler
  from sklearn.utils._testing import assert_allclose, assert_no_warnings
label_desc: Use image node_id 12 for calling a global function with example usage: test_transform_target_regressor_ensure_y_array() without return types