input: Write a python function to prepare data for a RandomForestRegressor model by encoding categorical features and separating the target variable.
  assert 'Net Sales' not in prepare_data(data).columns
  assert all(col in prepare_data(data).columns for col in pd.get_dummies(data[['Region', 'Area']]).columns)
  assert isinstance(prepare_data(data), pd.DataFrame)
output: def prepare_data(data):
      import pandas as pd
      from sklearn.model_selection import train_test_split
      
      # One-hot encode categorical columns
      categorical_cols = ['Region', 'Area']
      data_encoded = pd.get_dummies(data, columns=categorical_cols)
      
      # Drop the target variable from the features
      X = data_encoded.drop(columns=['Net Sales'])
      
      return X