input: Write a python function to split a dataset into training and test sets with a given test size and random state, and then evaluate the accuracy of a logistic regression model on the test set.
  assert split_and_evaluate(df, 'target_class', 0.2, 42) > 0
  assert isinstance(split_and_evaluate(df, 'target_class', 0.2, 42), float)
  assert 0 <= split_and_evaluate(df, 'target_class', 0.2, 42) <= 1
output: from sklearn.model_selection import train_test_split
  from sklearn.linear_model import LogisticRegression
  from sklearn.metrics import accuracy_score
  
  def split_and_evaluate(df, target_column, test_size, random_state):
      X = df.drop(columns=[target_column])
      y = df[target_column]
      X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=test_size, random_state=random_state)
      model = LogisticRegression()
      model.fit(X_train, y_train)
      y_pred = model.predict(X_test)
      accuracy = accuracy_score(y_test, y_pred)
      return accuracy