def print_opts(category, data, opts, file=None):
    'Print all options from dict "data" that are in "category"'
    if not any(opt in data for opt in opts):
        return
    print('\n%s' % category, file=file)
    print('-' * len(category), file=file)
    for opt in opts:
        if opt in data:
            value = data.get(opt)
            print("%12s: %s" % (opt, pformat2(value)), file=file)
dataset/ETHPy150Open Anaconda-Platform/chalmers/chalmers/utils/__init__.py/print_opts/original