input: Write a function to generate a simple linear regression model in Python. The function should read data from a CSV file, train the model on the data, make predictions, and visualize the results with a scatter plot of the data points and a line representing the predictions. The function should return the trained model.
  assert linear_reg_model('data.csv').predict([some_X_values])==some_Y_predictions
output: import pandas as pd
  import numpy as np
  from sklearn.linear_model import LinearRegression
  import matplotlib.pyplot as plt
  
  def linear_reg_model(file_path):
      data = pd.read_csv(file_path)
      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.show()
      
      return model