def resolve_option_flag(flag, df):
    """
    Method to resolve an option flag, which may be any of:
       - None or True:     use all columns in the dataframe
       - None:             use no columns 
       - list of columns   use these columns
       - function returning a list of columns
    """
    if flag is None or flag is True:
        return list(df)
    elif flag is False:
        return []
    elif hasattr(flag, '__call__'):
         return flag(df)
    else:
        return flag