def METHOD_NAME():
    """Check that we raise an error when the value associated to a feature
    is not supported.
    Non-regression test for:
    https://github.com/scikit-learn/scikit-learn/issues/19489
    """
    class A:
        pass
    vectorizer = DictVectorizer(sparse=True)
    X = [{"foo": A()}]
    err_msg = "Unsupported value Type"
    with pytest.raises(TypeError, match=err_msg):
        vectorizer.fit_transform(X)