input: Write a Python function to train a logistic regression model using a given dataset and evaluate its accuracy.
  assert train_and_evaluate_logistic_regression("dataset.csv") > 0.5
  assert isinstance(train_and_evaluate_logistic_regression("dataset.csv"), float)
  assert train_and_evaluate_logistic_regression("dataset.csv") <= 1.0
output: def train_and_evaluate_logistic_regression(file_path):
      import pandas as pd
      from sklearn.model_selection import train_test_split
      from sklearn.linear_model import LogisticRegression
      from sklearn.metrics import accuracy_score
  
      # Load the dataset
      data = pd.read_csv(file_path)
  
      # Assuming the target variable is named 'target' and the rest are features
      X = data.drop(columns=['target'])
      y = data['target']
  
      # Split the dataset 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)
  
      # Train the logistic regression model
      model = LogisticRegression()
      model.fit(X_train, y_train)
  
      # Make predictions on the test set
      y_pred = model.predict(X_test)
  
      # Evaluate the accuracy of the model
      accuracy = accuracy_score(y_test, y_pred)
      
      return accuracy