input: Write a function to train and evaluate a RandomForestRegressor on a given dataset.
  assert train_evaluate_random_forest('stock_data.csv') > 0.5
  assert isinstance(train_evaluate_random_forest('stock_data.csv'), float)
output: def train_evaluate_random_forest(file_path):
      import pandas as pd
      from sklearn.model_selection import train_test_split
      from sklearn.ensemble import RandomForestRegressor
      from sklearn.metrics import r2_score
  
      # Load the data
      data = pd.read_csv(file_path)
      
      # Assuming the last column is the target variable
      X = data.iloc[:, :-1]
      y = data.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)
      
      # Train the RandomForestRegressor
      model = RandomForestRegressor(random_state=42)
      model.fit(X_train, y_train)
      
      # Predict and evaluate
      y_pred = model.predict(X_test)
      score = r2_score(y_test, y_pred)
      
      return score