input: Write a function to perform linear regression for predicting the numbers in a given dataset. The function should take two lists X and Y as input, where X represents the independent variable and Y represents the dependent variable. The function should return the predicted value of Y for a new value of X provided as input.
  
  def linear_regression(X, Y, new_x):
      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([[new_x]])
  
  assert linear_regression([1,2,3,4,5], [3,5,7,9,13], 7) == [15]
  assert linear_regression([1,2,3,5,6], [4,6,8,12,14], 4) == [10]
  assert linear_regression([2,4,6,8,10], [7,13,19,25,34], 12) == [40]
  assert linear_regression([3,6,9,12], [5,11,17,23], 15) == [29]
  assert linear_regression([5,10,15,20], [9,19,29,39], 25) == [49]
output: def linear_regression(X, Y, new_x):
      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([[new_x]])