input: Write a python function to train a decision tree classifier using given datasets and visualize it.
  assert train_and_visualize_decision_tree(np.array([[0, 0], [1, 1], [0, 1], [1, 0]]), np.array(['A', 'B', 'A', 'B'])) is not None
  assert train_and_visualize_decision_tree(np.array([[2, 3], [6, 7], [1, 5], [7, 8]]), np.array(['X', 'Y', 'X', 'Y'])) is not None
output: def train_and_visualize_decision_tree(X, y):
      from sklearn.tree import DecisionTreeClassifier
      from sklearn import tree
      import matplotlib.pyplot as plt
  
      # Train the decision tree classifier
      clf = DecisionTreeClassifier()
      clf = clf.fit(X, y)
      
      # Visualize the decision tree
      plt.figure(figsize=(12, 8))
      tree.plot_tree(clf, filled=True, class_names=set(y), feature_names=[f'Feature {i}' for i in range(X.shape[1])])
      plt.show()
  
      return clf