input: Write a function to perform linear regression using the given dataset and predict the value of y for a new input x. Use the LinearRegression class from sklearn.linear_model and numpy for handling the data. If the input dataset is empty, return None.
  assert linear_regression([1,2,3,4,5], [3,5,7,9,13], 7)==17.0
  assert linear_regression([1,2,3], [1,4,6], 4)==7.0
  assert linear_regression([], [], 5)==None
  assert linear_regression([2,4,6], [4,8,12], 8)==16.0
  assert linear_regression([1,3,5], [2,6,10], 0)==0.0
output: def linear_regression(x, y, new_x):
      if len(x) == 0:
          return None
      import numpy as np
      from sklearn.linear_model import LinearRegression
      x = np.array(x).reshape(-1, 1)
      y = np.array(y).reshape(-1, 1)
      model = LinearRegression().fit(x, y)
      return model.predict(np.array([new_x]).reshape(-1, 1))[0][0]