input: Write a python function to train a decision tree classifier on customer data and return the classifier.
  assert isinstance(train_decision_tree('customer_data.csv'), tree.DecisionTreeClassifier)
  assert hasattr(train_decision_tree('customer_data.csv'), 'predict')
  assert hasattr(train_decision_tree('customer_data.csv'), 'fit')
output: def train_decision_tree(file_path):
      import pandas as pd
      from sklearn import tree
      from sklearn.model_selection import train_test_split
      from sklearn.preprocessing import LabelEncoder
  
      # Load the data
      data = pd.read_csv(file_path)
  
      # Assume the last column is the target variable and others are features
      X = data.iloc[:, :-1]
      y = data.iloc[:, -1]
  
      # Handle categorical variables if any
      label_encoders = {}
      for column in X.select_dtypes(include=['object']).columns:
          le = LabelEncoder()
          X[column] = le.fit_transform(X[column])
          label_encoders[column] = le
  
      if y.dtype == 'object':
          y = LabelEncoder().fit_transform(y)
  
      # Split the dataset 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)
  
      # Create the decision tree classifier
      clf = tree.DecisionTreeClassifier()
  
      # Train the classifier
      clf.fit(X_train, y_train)
  
      return clf