input: Write a python function to load housing data, split it into training and testing sets, train a linear regression model, predict the prices, and visualize the results with a scatter plot.
  assert len(load_and_predict('housing.csv')[0]) > 0
  assert load_and_predict('housing.csv')[1].shape[1] == 1
  assert isinstance(load_and_predict('housing.csv')[2], np.ndarray)
output: import pandas as pd
  import numpy as np
  from sklearn.model_selection import train_test_split
  from sklearn.linear_model import LinearRegression
  import matplotlib.pyplot as plt
  
  def load_and_predict(filepath):
      # Load the dataset
      data = pd.read_csv(filepath)
      
      # Assume the last column is the target variable
      X = data.iloc[:, :-1].values
      y = data.iloc[:, -1].values
      
      # Split the data 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)
      
      # Train the linear regression model
      model = LinearRegression()
      model.fit(X_train, y_train)
      
      # Predict the prices
      y_pred = model.predict(X_test)
      
      # Visualize the results
      plt.scatter(y_test, y_pred, color='blue')
      plt.xlabel('Actual Prices')
      plt.ylabel('Predicted Prices')
      plt.title('Actual vs Predicted Prices')
      plt.show()
      
      return X_test, y_pred.reshape(-1, 1), y_test