input: Write a python function to create and train a linear regression model using given x and y data arrays, and return the coefficient and predicted values.
  assert linear_regression([1, 2, 3], [2, 4, 6]) == (2.0, [2.0, 4.0, 6.0])
  assert linear_regression([0, 2, 4], [1, 5, 9]) == (2.0, [1.0, 5.0, 9.0])
  assert linear_regression([1, 2, 3], [1, 2, 3]) == (1.0, [1.0, 2.0, 3.0])
output: def linear_regression(x, y):
      from sklearn.linear_model import LinearRegression
      import numpy as np
      
      x = np.array(x).reshape(-1, 1)
      y = np.array(y)
      
      model = LinearRegression()
      model.fit(x, y)
      
      coefficient = model.coef_[0]
      predictions = model.predict(x).tolist()
      
      return coefficient, predictions