def custom_train_test_split(game_data, train_size, first_week, last_week):
    """
  Splits the game data into (shuffled) train and test sets.
  ----------  
  Parameters
  ----------
    game_data: DataFrame
      The total data from which the train and test sets are drawn
    train_size: float
      The proportion of the relevant data to be used for training
    first_week, last_weeks: int
      The first and last weeks of the season from which data is drawn
  """
    game_data_range = game_data[(game_data.week >= first_week) & (game_data
        .week <= min(19, last_week))].reset_index(drop=True)
    train = game_data_range.iloc[:int(len(game_data_range) * train_size)
        ].sample(frac=1).reset_index(drop=True)
    test = game_data_range.iloc[int(len(game_data_range) * train_size):
        ].reset_index(drop=True)
    return train, test
