input: Write a function to implement a simple linear regression model in Python. The function should read data from a CSV file, train a linear regression model, make predictions, and visualize the results.
  assert linear_regression_model('data.csv')
  # Note: The assert statement does not have a comparison, as the function does not return a value, but performs operations like reading data, training the model, making predictions, and visualizing the results.
output: import pandas as pd
  import numpy as np
  import matplotlib.pyplot as plt
  from sklearn.linear_model import LinearRegression
  
  def linear_regression_model(filename):
      data = pd.read_csv(filename)
      X = data.iloc[:, :-1].values
      y = data.iloc[:, -1].values
      
      model = LinearRegression()
      model.fit(X, y)
      
      y_pred = model.predict(X)
      
      plt.scatter(X, y, color='blue')
      plt.plot(X, y_pred, color='red')
      plt.title('Linear Regression')
      plt.xlabel('X')
      plt.ylabel('y')
      plt.show()