input: Write a python function to build and use a voting classifier ensemble model.
  assert ensembler.predict([{'feature1': 1, 'feature2': 0}]) == [1]
  assert ensembler.predict([{'feature1': 0, 'feature2': 1}]) == [0]
  assert ensembler.predict([{'feature1': 1, 'feature2': 1}]) == [1]
output: from sklearn.base import BaseEstimator, ClassifierMixin
  from sklearn.tree import DecisionTreeClassifier
  from sklearn.neighbors import KNeighborsClassifier
  from sklearn.linear_model import LogisticRegression
  from sklearn.ensemble import VotingClassifier
  import numpy as np
  
  class VotingEnsemble(BaseEstimator, ClassifierMixin):
      def __init__(self):
          self.models = [
              ('decision_tree', DecisionTreeClassifier()),
              ('knn', KNeighborsClassifier()),
              ('logistic_regression', LogisticRegression())
          ]
          self.ensemble = VotingClassifier(estimators=self.models, voting='hard')
          
      def fit(self, X, y):
          self.ensemble.fit(X, y)
          
      def predict(self, X):
          X_transformed = self._transform_input(X)
          return self.ensemble.predict(X_transformed)
      
      def _transform_input(self, X):
          return np.array([[x['feature1'], x['feature2']] for x in X])
  
  def build_and_use_voting_classifier():
      # Create a training dataset
      X_train = [{'feature1': 1, 'feature2': 0}, {'feature1': 0, 'feature2': 1}, {'feature1': 1, 'feature2': 1}]
      y_train = [1, 0, 1]
      
      # Transform the training data
      X_train_transformed = np.array([[x['feature1'], x['feature2']] for x in X_train])
      
      # Build the model
      ensembler = VotingEnsemble()
      ensembler.fit(X_train_transformed, y_train)
      
      return ensembler
  
  # Usage
  ensembler = build_and_use_voting_classifier()