def simple_train_test_split(
    df,
    forecast_length: int = 10,
    min_allowed_train_percent: float = 0.3,
    verbose: int = 1,
):
    """
    Uses the last periods of forecast_length as the test set, the rest as train

    Args:
        forecast_length (int): number of future periods to predict

        min_allowed_train_percent (float): - forecast length cannot be greater than 1 - this
            constrains the forecast length from being much larger than than the training data
            note this includes NaNs in current configuration

    Returns:
        train, test  (both pd DataFrames)
    """
    assert forecast_length > 0, "forecast_length must be greater than 0"

    if (forecast_length * min_allowed_train_percent) > int(
        (df.shape[0]) - forecast_length
    ):
        raise ValueError(
            "forecast_length is too large, not enough training data, alter min_allowed_train_percent to override, or reduce validation number, if applicable"
        )

    train = df.head((df.shape[0]) - forecast_length)
    test = df.tail(forecast_length)

    if (verbose > 0) and ((train.isnull().sum(axis=0) / train.shape[0]).max() > 0.9):
        print("One or more series is 90% or more NaN in this train split")
    if (verbose >= 0) and ((test.isnull().sum(axis=0) / test.shape[0]).max() > 0.9):
        print("One or more series is 90% or more NaN in this test split")
    return train, test