def _get_columns(list_of_cols, x_train) ->list:
    """
    If the list of columns are optional and no columns are provided, the columns are set
    to all the columns in the data.
    
    Parameters
    ----------
    list_of_cols : list
        List of columns to apply method to.

    x_train : Dataframe or array like - 2d
        Training Dataset
    
    Returns
    -------
    list
        List of columns to apply technique to
    """
    if list_of_cols:
        list_of_cols = list_of_cols
    else:
        list_of_cols = x_train.columns.tolist()
    return list_of_cols
