Write a Python program to predict the class label for a given data sample.
X = [[2.2, 3.5], [2.7, 3.2]]
y = [1, 0]
from sklearn.linear_model import LogisticRegression

model = LogisticRegression()

model.fit(X, y)

def predict_class(X):
    pred = model.predict([X])
    return pred