input: Write a function to design a Python program that performs linear regression to predict the numbers in a given dataset. The function should take two lists, X and Y, as inputs, where X represents the independent variable and Y represents the dependent variable. It should return the predicted value for a new input X.
  
  def linear_regression(X, Y):
      import numpy as np
      from sklearn.linear_model import LinearRegression
  
      X = np.array(X).reshape(-1,1)
      Y = np.array(Y)
  
      model = LinearRegression()
      model.fit(X, Y)
  
      # Predicts the value of y for a new input X
      return model.predict([[7]])
  
  assert np.isclose(linear_regression([1,2,3,4,5], [3,5,7,9,13]), 15).all()
  assert np.isclose(linear_regression([1,2,3,4,5], [2,4,6,8,12]), 14).all()
  assert np.isclose(linear_regression([1,2,3,4,5], [4,6,8,10,12]), 16).all()
  assert np.isclose(linear_regression([1,2,3,4,5], [1,2,3,4,5]), 7).all()
  assert np.isclose(linear_regression([1,2,3,4,5], [3,6,9,12,15]), 21).all()
output: 
  def linear_regression(X, Y):
      import numpy as np
      from sklearn.linear_model import LinearRegression
  
      X = np.array(X).reshape(-1,1)
      Y = np.array(Y)
  
      model = LinearRegression()
      model.fit(X, Y)
  
      return model.predict([[7]])
  