input: Write a python function to train a logistic regression model and check its accuracy.
  assert train_and_check_accuracy('data.csv') > 0.7
  assert train_and_check_accuracy('data_with_different_values.csv') > 0.75
  assert train_and_check_accuracy('another_data_file.csv') < 1.0
output: def train_and_check_accuracy(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 data
      data = pd.read_csv(file_path)
      
      # Assuming the last column is the target
      X = data.iloc[:, :-1]
      y = data.iloc[:, -1]
      
      # Split the data into train and test 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)
      
      # Predict on the test set
      y_pred = model.predict(X_test)
      
      # Calculate the accuracy
      accuracy = accuracy_score(y_test, y_pred)
      
      return accuracy