input: Write a python function to load a CSV file, train a logistic regression model, make predictions, and return the accuracy of the model.
  assert train_logistic_regression('data.csv') == 1.0
output: def train_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 last column is the target variable
      X = data.iloc[:, :-1]  # Features
      y = data.iloc[:, -1]   # Target variable
  
      # 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
      y_pred = model.predict(X_test)
  
      # Calculate the accuracy
      accuracy = accuracy_score(y_test, y_pred)
      
      return accuracy