input: Write a python function to train a DecisionTreeClassifier on a given dataset and return its accuracy.
  assert decision_tree_accuracy('patients_data.csv') > 0
  assert isinstance(decision_tree_accuracy('patients_data.csv'), float)
output: def decision_tree_accuracy(csv_file):
      import pandas as pd
      from sklearn.model_selection import train_test_split
      from sklearn.tree import DecisionTreeClassifier
      from sklearn.metrics import accuracy_score
      
      # Load the dataset
      data = pd.read_csv(csv_file)
      
      # Assuming the last column is the target variable
      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)
      
      # Train the DecisionTreeClassifier
      clf = DecisionTreeClassifier()
      clf.fit(X_train, y_train)
      
      # Predict on the test set
      y_pred = clf.predict(X_test)
      
      # Calculate the accuracy
      accuracy = accuracy_score(y_test, y_pred)
      
      return accuracy