input: Write a function to generate a Python script that prepares and submits a model prediction to a Kaggle competition. The script should include reading in the training data, splitting the data, defining and fitting the model, making predictions, and calculating the accuracy score. If the script is successful, it should return True; otherwise, it should return False.
  
  assert kaggle_competition_submission() == True
output: def kaggle_competition_submission():
      import pandas as pd
      from sklearn.model_selection import train_test_split
      from sklearn.ensemble import RandomForestClassifier
      from sklearn.metrics import accuracy_score
  
      # Read in the training data
      train_data = pd.read_csv('train.csv')
  
      # Split the data into features and target
      X = train_data.drop('target', axis=1)
      y = train_data['target']
  
      # 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)
  
      # Define and fit the model
      model = RandomForestClassifier(random_state=42)
      model.fit(X_train, y_train)
  
      # Make predictions
      y_pred = model.predict(X_test)
  
      # Calculate the accuracy score
      accuracy = accuracy_score(y_test, y_pred)
  
      # Return True if the script is successful
      return True