input: Write a python function to train a RandomForestRegressor model on a given dataset and return the mean squared error.
  assert round(train_and_evaluate_model('AAPL.csv'), 2) == 0.03  # Note: The expected value is hypothetical and should be adjusted based on the dataset used.
  assert isinstance(train_and_evaluate_model('AAPL.csv'), float)
output: from sklearn.ensemble import RandomForestRegressor
  from sklearn.metrics import mean_squared_error
  import pandas as pd
  from sklearn.model_selection import train_test_split
  
  def train_and_evaluate_model(file_path):
      # Load the dataset
      df = pd.read_csv(file_path)
      
      # Assuming the last column is the target variable
      X = df.iloc[:, :-1]
      y = df.iloc[:, -1]
      
      # Split the data into training and testing sets
      X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
      
      # Initialize the model
      model = RandomForestRegressor(random_state=42)
      
      # Train the model
      model.fit(X_train, y_train)
      
      # Make predictions
      y_pred = model.predict(X_test)
      
      # Calculate the mean squared error
      mse = mean_squared_error(y_test, y_pred)
      
      return mse