code: def test_allow_string_feature():
      df = pd.DataFrame({"Text": ["Hello", "how are you?"]})
      with pytest.warns(
          UserWarning,
          match=r"Input Column Text has generic type object. "
          r"Autosklearn will treat this column as string. "
          r"Please ensure that this setting is suitable for your task.",
      ):
          validator = FeatureValidator(allow_string_features=False)
          feat_type = validator.get_feat_type_from_columns(df)
  
      column_types = {"Text": "categorical"}
      assert feat_type == column_types
  
      df["Text"] = df["Text"].astype("string")
      with pytest.warns(
          UserWarning,
          match=r"you disabled text encoding column Text will be "
          r"encoded as category",
      ):
          validator = FeatureValidator(allow_string_features=False)
          feat_type = validator.get_feat_type_from_columns(df)
  
      column_types = {"Text": "categorical"}
      assert feat_type == column_types
  
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 13 for calling a global function with example usage: test_allow_string_feature() without return types