input: Write a python function to train a linear regression model to predict monthly expenses given monthly income and test it with the following assertions.
  assert round(predict_expense(1900), 2) == 750
  assert round(predict_expense(2300), 2) == 850
  assert round(predict_expense(2800), 2) == 950
  assert round(predict_expense(3500), 2) == 1250
output: def predict_expense(monthly_income):
      import numpy as np
      from sklearn.linear_model import LinearRegression
      
      # Sample data: [monthly_income, monthly_expense]
      data = np.array([
          [2000, 800],
          [2500, 900],
          [3000, 1000],
          [4000, 1300]
      ])
      
      X = data[:, 0].reshape(-1, 1)  # monthly_income
      y = data[:, 1]  # monthly_expense
      
      # Train the model
      model = LinearRegression()
      model.fit(X, y)
      
      # Predict the expense
      predicted_expense = model.predict([[monthly_income]])
      
      return predicted_expense[0]