input: Write a python function to train a RandomForestClassifier on a given dataset and return the accuracy score.
  assert train_random_forest('<file_name>.csv') > 0.5
  assert isinstance(train_random_forest('<file_name>.csv'), float)
output: def train_random_forest(file_name):
      import pandas as pd
      from sklearn.model_selection import train_test_split
      from sklearn.ensemble import RandomForestClassifier
      from sklearn.metrics import accuracy_score
      
      # Load dataset
      data = pd.read_csv(file_name)
      
      # 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.3, random_state=42)
      
      # Initialize the RandomForestClassifier
      clf = RandomForestClassifier(random_state=42)
      
      # Train the classifier
      clf.fit(X_train, y_train)
      
      # Make predictions
      y_pred = clf.predict(X_test)
      
      # Calculate accuracy
      accuracy = accuracy_score(y_test, y_pred)
      
      return accuracy