def get_data_splits_by_month(logger, df, train_months, validation_months):
    """
    Returns training & holdout set from the train data based on months

    train_months: List of numbers representing months. For example,
                  [1, 2, 3, 4] represents Jan, Feb, March, April

    test_months: List of numbers representing months. For example,
                  [5, 6, 7, 8] represents May, June, July, August
    """
    logger.info(f'Splitting the data into train and holdout based on months...')
    logger.info(f'Training months {train_months}')
    logger.info(f'Validation months {validation_months}')
    training = df[df.month.isin(train_months)]
    validation = df[df.month.isin(validation_months)]
    logger.info(f'Shape of the training data {training.shape} ')
    logger.info(f'Shape of the validation data {validation.shape}')
    return training, validation