def get_default_options(options, non_default_options):
    options_dict = vars(options)
    non_default_options_dict = vars(non_default_options)
    default_options = Values(dict((k, options_dict[k]) for k in options_dict
                                  if k not in non_default_options_dict))
    return default_options
Given a dictionary of options containing the defaults optparse has filled
dataset/ETHPy150Open prestodb/presto-admin/prestoadmin/main.py/get_default_options