def adjust_columns_types(cols_to_convert_cat, X_train, X_test, y_train, y_test
    ):
    """
    given train and test dataframes and a list of columns that should be categorical
    returns the initial dataframes with correct types
    :param cols_to_convert_cat: [list of str] columns that should be categorical but aren't
    :param X_train: [pandas DataFrame] train predictor columns
    :param X_test: [pandas DataFrame] test predictor columns
    :param y_train: [pandas Series] train target column
    :param y_test: [pandas Series] train target column
    :return: adjusted_X_train, adjusted_X_test, adjusted_y_train, adjusted_y_test which are the initial dataframes with
    correct types
    """
    (adjusted_X_train, adjusted_X_test, adjusted_y_train, adjusted_y_test
        ) = X_train.copy(), X_test.copy(), y_train.copy(), y_test.copy()
    if cols_to_convert_cat is not None:
        if y_train.name in cols_to_convert_cat:
            adjusted_y_train = y_train.astype('category')
            cols_to_convert_cat.remove(y_train.name)
            adjusted_y_test = y_test.astype('category')
        adjusted_X_train[cols_to_convert_cat] = X_train[cols_to_convert_cat
            ].apply(lambda num_col: num_col.astype('category'))
        adjusted_X_test[cols_to_convert_cat] = X_test[cols_to_convert_cat
            ].apply(lambda num_col: num_col.astype('category'))
    return adjusted_X_train, adjusted_X_test, adjusted_y_train, adjusted_y_test
