input: Write a python function to load a dataset, preprocess the data, train a logistic regression model, and return the accuracy.
  assert train_logistic_regression('credit_default.csv') > 0.7
  assert train_logistic_regression('small_credit_default.csv') > 0.6
output: def train_logistic_regression(file_path):
      import pandas as pd
      from sklearn.model_selection import train_test_split
      from sklearn.preprocessing import StandardScaler
      from sklearn.linear_model import LogisticRegression
      from sklearn.metrics import accuracy_score
  
      # Load dataset
      data = pd.read_csv(file_path)
  
      # Assuming the last column is the target and the rest are features
      X = data.iloc[:, :-1]
      y = data.iloc[:, -1]
  
      # Split the data 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)
  
      # Standardize the features
      scaler = StandardScaler()
      X_train = scaler.fit_transform(X_train)
      X_test = scaler.transform(X_test)
  
      # Train the logistic regression model
      model = LogisticRegression(max_iter=1000)
      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