code: def test_list_to_dataframe(openml_id):
      X_pandas, y_pandas = sklearn.datasets.fetch_openml(
          data_id=openml_id, return_X_y=True, as_frame=True
      )
      (
          X_train,
          X_test,
          y_train,
          y_test,
      ) = sklearn.model_selection.train_test_split(
          X_pandas, y_pandas, random_state=1
      )
  
      X_list = X_train.values.tolist()
      validator = FeatureValidator()
      validator.fit(X_list)
      transformed_X = validator.transform(X_list)
      for i, col in enumerate(X_pandas.columns):
          if is_numeric_dtype(X_pandas[col].dtype):
              # convert dtype translates 72.0 to 72. Be robust against this!
              assert is_numeric_dtype(transformed_X[i].dtype)
          elif is_string_dtype(X_pandas[col].dtype):
              assert is_string_dtype(X_pandas[col].dtype)
          elif is_categorical_dtype(X_pandas[col].dtype):
              assert is_categorical_dtype(X_pandas[col].dtype)
          else:
              raise NotImplementedError
  
      # Also make sure that at testing time
      # this work
      transformed_X = validator.transform(X_test.values.tolist())
      for i, col in enumerate(X_pandas.columns):
          if is_numeric_dtype(X_pandas[col].dtype):
              # convert dtype translates 72.0 to 72. Be robust against this!
              assert is_numeric_dtype(transformed_X[i].dtype)
          elif is_string_dtype(X_pandas[col].dtype):
              assert is_string_dtype(X_pandas[col].dtype)
          elif is_categorical_dtype(X_pandas[col].dtype):
              assert is_categorical_dtype(X_pandas[col].dtype)
          else:
              raise NotImplementedError
  
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 9 for calling a global function with example usage: test_list_to_dataframe(openml_id) without return types