def split_data(series_features, training_percent=0.9, testing_percent=0.1, seed=0):
    """This function splits the data into training and testing data and returns both as variables.
      Parameters:
        series_features  (REQUIRED             ) - list of LabeledPoint data points
        training_percent (OPTIONAL; DEFAULT=0.9) - percentage of the data you want to train on
        testing_percent  (OPTIONAL; DEFAULT=0.1) - percentage of the data you want to test on
        seed             (OPTIONAL; DEFAULT=0  ) - what random seed you want
      """
    # Splits the data randomly into training and testing data with an optional seed
    training, testing = series_features.randomSplit([training_percent, testing_percent], seed)
    return training, testing