input: Write a function to load a dataset, train a Linear Regression model, and return the Mean Squared Error for both an unoptimized and optimized model.
  assert abs(train_and_evaluate_model('house_pricing.csv')[0] - 123456.789) < 0.01
  assert abs(train_and_evaluate_model('house_pricing.csv')[1] - 98765.4321) < 0.01
output: def train_and_evaluate_model(filename):
      import pandas as pd
      from sklearn.model_selection import train_test_split
      from sklearn.linear_model import LinearRegression
      from sklearn.metrics import mean_squared_error
      from sklearn.preprocessing import StandardScaler
      from sklearn.pipeline import make_pipeline
      from sklearn.model_selection import GridSearchCV
  
      # Load dataset
      df = pd.read_csv(filename)
  
      # Assuming the target column is named 'target' and features are all other columns
      X = df.drop(columns='target')
      y = df['target']
  
      # Split the data into train and test sets
      X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
  
      # Train unoptimized Linear Regression model
      model = LinearRegression()
      model.fit(X_train, y_train)
      y_pred = model.predict(X_test)
      mse_unoptimized = mean_squared_error(y_test, y_pred)
  
      # Train optimized Linear Regression model
      pipeline = make_pipeline(StandardScaler(), LinearRegression())
      param_grid = {
          'linearregression__fit_intercept': [True, False],
          'linearregression__normalize': [True, False]
      }
      grid_search = GridSearchCV(pipeline, param_grid, cv=5, scoring='neg_mean_squared_error')
      grid_search.fit(X_train, y_train)
      y_pred_optimized = grid_search.predict(X_test)
      mse_optimized = mean_squared_error(y_test, y_pred_optimized)
  
      return mse_unoptimized, mse_optimized