input: Write a function to create 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. The CSV file should contain columns 'X' and 'Y'.
  
  
  assert linear_regression('data.csv')==None
  
output: def linear_regression(file_path):
      import pandas as pd
      from sklearn.linear_model import LinearRegression
      import matplotlib.pyplot as plt
  
      data = pd.read_csv(file_path)
      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.xlabel('X')
      plt.ylabel('Y')
      plt.title('Linear Regression')
      plt.show()