input: Write a function to create a simple linear regression model in Python. The function should read data from a CSV file, set X and Y variables, train the model using linear regression, make predictions, and visualize the results with a scatter plot. The CSV file is named 'data.csv' and contains columns 'X' and 'Y'.
  assert linear_regression_model()
  # The function should generate a scatter plot with the line of best fit in red.
output: def linear_regression_model():
      import pandas as pd
      from sklearn.linear_model import LinearRegression
      import matplotlib.pyplot as plt
  
      data = pd.read_csv('data.csv')
      X = data[['X']]
      Y = data['Y']
  
      model = LinearRegression()
      model.fit(X, Y)
  
      predictions = model.predict(X)
  
      plt.scatter(X, Y, color='blue')
      plt.plot(X, predictions, color='red')
      plt.show()