input: Write a python function to train a logistic regression model on a text dataset to predict sentiment, and evaluate its accuracy.
  assert train_and_evaluate_model('reviews.csv') > 0.7
output: def train_and_evaluate_model(file_path):
      import pandas as pd
      from sklearn.model_selection import train_test_split
      from sklearn.feature_extraction.text import CountVectorizer
      from sklearn.linear_model import LogisticRegression
      from sklearn.metrics import accuracy_score
  
      # Load dataset
      data = pd.read_csv(file_path)
  
      # Splitting data into features and labels
      X = data['review']
      y = data['sentiment']
  
      # Splitting into training and testing sets
      X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
  
      # Vectorizing text data
      vectorizer = CountVectorizer()
      X_train_vec = vectorizer.fit_transform(X_train)
      X_test_vec = vectorizer.transform(X_test)
  
      # Training logistic regression model
      model = LogisticRegression()
      model.fit(X_train_vec, y_train)
  
      # Making predictions
      y_pred = model.predict(X_test_vec)
  
      # Calculating accuracy
      accuracy = accuracy_score(y_test, y_pred)
  
      return accuracy