def _set_item(x_train, x_test, column: str, value: list, train_length: int,
    test_length: int):
    """
    Utility function for __setitem__ for determining which input is for which dataset
    and then sets the input to the new column for the correct dataset.
    
    Parameters
    ----------
    x_train : Dataframe
        Training Data

    x_test : Dataframe
        Testing Data

    column : str
        New column name

    value : list
        List of values for new column

    train_length : int
        Length of training data
        
    test_length : int
        Length of training data
    """
    if len(value) == train_length and len(value) == test_length:
        x_train[column] = value
        x_test[column] = value
    elif len(value) == train_length:
        x_train[column] = value
    else:
        x_test[column] = value
    return x_train, x_test
