def METHOD_NAME():
    encoder = LabelEncoder(positive_label="a")
    y = pd.Series(["a", "b", "b", "a"])
    encoder.fit(None, y)
    with pytest.raises(ValueError, match="y contains previously unseen labels"):
        encoder.transform(None, pd.Series(["x", "y", "x"]))