input: Write a python function to train a linear regression model and return the accuracy.
  assert train_and_evaluate_linear_regression_model(pd.DataFrame({
      'Population':[100000, 200000, 150000],
      'Budget':[3000000, 5000000, 4000000],
      'Accidents':[5, 10, 7]
  })) == 1.0
  assert train_and_evaluate_linear_regression_model(pd.DataFrame({
      'Population':[100000, 200000],
      'Budget':[3000000, 5000000],
      'Accidents':[5, 10]
  })) >= 0.0
output: def train_and_evaluate_linear_regression_model(df):
      from sklearn.linear_model import LinearRegression
      from sklearn.metrics import r2_score
  
      X = df[['Population', 'Budget']]
      y = df['Accidents']
      
      model = LinearRegression()
      model.fit(X, y)
      
      predictions = model.predict(X)
      accuracy = r2_score(y, predictions)
      
      return accuracy