code: def test_featurevalidator_new_data_after_fit(
      openml_id, train_data_type, test_data_type
  ):
      # List is currently not supported as infer_objects
      # cast list objects to type objects
      if train_data_type == "list" or test_data_type == "list":
          pytest.skip()
  
      validator = FeatureValidator()
  
      if train_data_type == "numpy":
          X, y = sklearn.datasets.fetch_openml(
              data_id=openml_id, return_X_y=True, as_frame=False
          )
      elif train_data_type == "pandas":
          X, y = sklearn.datasets.fetch_openml(
              data_id=openml_id, return_X_y=True, as_frame=True
          )
      else:
          X, y = sklearn.datasets.fetch_openml(
              data_id=openml_id, return_X_y=True, as_frame=True
          )
          X = X.values.tolist()
          y = y.values.tolist()
  
      (
          X_train,
          X_test,
          y_train,
          y_test,
      ) = sklearn.model_selection.train_test_split(X, y, random_state=1)
  
      validator.fit(X_train)
  
      transformed_X = validator.transform(X_test)
  
      # Basic Checking
      if sparse.issparse(input_data_featuretest):
          assert sparse.issparse(transformed_X)
      elif isinstance(input_data_featuretest, list):
          assert isinstance(transformed_X, pd.DataFrame)
      else:
          assert isinstance(transformed_X, type(X_train))
      assert np.shape(X_test) == np.shape(transformed_X)
  
imports: import numpy
  import pandas
  import sklearn.datasets
  import sklearn.model_selection
  from pandas.api.types import is_categorical_dtype, is_numeric_dtype, is_string_dtype
  from scipy import sparse
  from autosklearn.data.feature_validator import FeatureValidator
  import pytest
label_desc: Use image node_id 8 for calling a global function with example usage: test_featurevalidator_new_data_after_fit(openml_id, train_data_type, test_data_type) without return types