input: Write a python function to preprocess a DataFrame by imputing missing values with the mean and scaling features to a range between 0 and 1 using a pipeline.
  assert preprocess_data(pd.DataFrame({'A': [1, 2, None], 'B': [4, 5, 6]})).equals(pd.DataFrame({'A': [0.0, 1.0, 0.5], 'B': [0.0, 0.5, 1.0]}))
  assert preprocess_data(pd.DataFrame({'A': [10, 20, 30], 'B': [None, 50, 60]})).equals(pd.DataFrame({'A': [0.0, 0.5, 1.0], 'B': [0.0, 0.5, 1.0]}))
  assert preprocess_data(pd.DataFrame({'A': [3, None, 8], 'B': [7, 8, 9]})).equals(pd.DataFrame({'A': [0.0, 0.0, 1.0], 'B': [0.0, 0.5, 1.0]}))
output: import pandas as pd
  from sklearn.pipeline import Pipeline
  from sklearn.impute import SimpleImputer
  from sklearn.preprocessing import MinMaxScaler
  
  def preprocess_data(df):
      pipeline = Pipeline([
          ('imputer', SimpleImputer(strategy='mean')),
          ('scaler', MinMaxScaler())
      ])
      return pd.DataFrame(pipeline.fit_transform(df), columns=df.columns)