input: Write a python function to train a decision tree classifier on a given dataset and return the accuracy and feature importances.
  assert train_decision_tree('data.csv') == {'accuracy': 0.95, 'feature_importances': [0.1, 0.2, 0.3, 0.4]}
  assert train_decision_tree('another_data.csv') == {'accuracy': 0.85, 'feature_importances': [0.15, 0.25, 0.35, 0.25]}
output: def train_decision_tree(file_path):
      import pandas as pd
      from sklearn.model_selection import train_test_split
      from sklearn.tree import DecisionTreeClassifier
      from sklearn.metrics import accuracy_score
      
      # Load dataset
      data = pd.read_csv(file_path)
      X = data.iloc[:, :-1]  # Assuming last column is the target
      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.3, random_state=42)
      
      # Train the decision tree classifier
      clf = DecisionTreeClassifier(random_state=42)
      clf.fit(X_train, y_train)
      
      # Make predictions
      y_pred = clf.predict(X_test)
      
      # Calculate accuracy
      accuracy = accuracy_score(y_test, y_pred)
      
      # Get feature importances
      feature_importances = clf.feature_importances_
      
      return {'accuracy': accuracy, 'feature_importances': feature_importances.tolist()}