input: Write a python function to prepare input and target for a decision tree classifier and train the model.
  assert train_decision_tree([['M', 24, 33800, 'Petrol'], ['F', 35, 35000, 'Electric'], ['F', 40, 45000, 'Petrol'], ['M', 20, 25000, 'Electric'], ['M', 30, 32000, 'Petrol'], ['F', 50, 60000, 'Electric']], [1, 0, 1, 0, 0, 1]) is not None
  assert train_decision_tree([['M', 25, 34000, 'Petrol'], ['F', 30, 36000, 'Electric']], [1, 0]) is not None
  assert train_decision_tree([['F', 45, 47000, 'Petrol'], ['M', 22, 27000, 'Electric']], [1, 1]) is not None
output: def train_decision_tree(data, labels):
      from sklearn.tree import DecisionTreeClassifier
      from sklearn.preprocessing import LabelEncoder
  
      # Convert categorical features to numerical values
      label_encoders = [LabelEncoder() for _ in range(len(data[0]))]
      
      # Transform each column using the respective LabelEncoder
      for i in range(len(data[0])):
          column = [row[i] for row in data]
          label_encoders[i].fit(column)
          transformed_column = label_encoders[i].transform(column)
          for j in range(len(data)):
              data[j][i] = transformed_column[j]
      
      # Initialize and train the decision tree classifier
      clf = DecisionTreeClassifier()
      clf.fit(data, labels)
      
      return clf